]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: scsi: add weight support
authorJason Wang <jasowang@redhat.com>
Fri, 17 May 2019 04:29:52 +0000 (00:29 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 27 May 2019 15:08:23 +0000 (11:08 -0400)
commitb2200d93433ec373fc76ba875b8be6f34cc7a61a
tree5953d50a42d2f086a21d6f9cfe8f97d4f6b6b7e3
parent109b15c49a43d8b780ed4df850a3a4d61124ba18
vhost: scsi: add weight support

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: bba9009654e0 ("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>
drivers/vhost/scsi.c