]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vhost: scsi: add weight support
authorJason Wang <jasowang@redhat.com>
Fri, 17 May 2019 04:29:52 +0000 (00:29 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit9362f7506d008c5d94e9724de10bf22f410bcfae
tree5a8a12e6faa356757e87519eb7e5e9f57dd33cec
parent67b8b619b5d46332f68a80ebe6ab855098fdf2b0
vhost: scsi: add weight support

BugLink: https://bugs.launchpad.net/bugs/1838824
commit c1ea02f15ab5efb3e93fc3144d895410bf79fcf2 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: 057cbf49a1f0 ("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>
Signed-off-by: Balbir Singh <sblbir@amzn.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/vhost/scsi.c