linux-stable/drivers/vhost
Jason Wang 02cdc16612 vhost: scsi: add weight support
commit c1ea02f15a upstream.

This patch will check the weight and exit the loop if we exceeds the
weight. This is useful for preventing scsi kthread from hogging cpu
which is guest triggerable.

This addresses CVE-2019-3900.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: 057cbf49a1 ("tcm_vhost: Initial merge for vhost level target fabric driver")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[jwang: backport to 4.19]
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-04 09:30:55 +02:00
..
Kconfig vhost: allow vhost-scsi driver to be built-in 2018-08-22 01:01:32 +03:00
Kconfig.vringh
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
net.c vhost_net: fix possible infinite loop 2019-08-04 09:30:55 +02:00
scsi.c vhost: scsi: add weight support 2019-08-04 09:30:55 +02:00
test.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vhost.c vhost: introduce vhost_exceeds_weight() 2019-08-04 09:30:55 +02:00
vhost.h vhost: introduce vhost_exceeds_weight() 2019-08-04 09:30:55 +02:00
vringh.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
vsock.c vhost: vsock: add weight support 2019-08-04 09:30:55 +02:00