[SRU Xenial][PATCH 0/2] Improve our SAUCE for virtio-scsi reqs counter (fix CPU soft lockup)

Mauricio Faria de Oliveira mfo at canonical.com
Tue Oct 16 15:38:18 UTC 2018

BugLink: https://bugs.launchpad.net/bugs/1798110


 * Detaching virtio-scsi disk in Xenial guest can cause
   CPU soft lockup in guest (and take 100% CPU in host).

 * It may prevent further progress on other tasks that
   depend on resources locked earlier in the SCSI target
   removal stack, and/or impact other SCSI functionality.

 * The fix resolves a corner case in the requests counter
   in the virtio SCSI target, which impacts a downstream
   (SAUCE) patch in the virtio-scsi target removal handler
   that depends on the requests counter value to be zero.

[Test Case]

 * See LP #1798110 (this bug)'s comment #3 (too long for
   this section -- synthetic case with GDB+QEMU) and
   comment #4 (organic test case in cloud instance).

[Regression Potential] 

 * It seem low -- this only affects the SCSI command requeue
   path with regards to the reference counter, which is only
   used with real chance of problems in our downstream patch
   (which is now passing this testcase).

 * The other less serious issue would be decrementing it to
   a negative / < 0 value, which is not possible with this
   driver logic (see commit message), because the reqs counter
   is always incremented before calling virtscsi_queuecommand(),
   where this decrement operation is inserted.

Mauricio Faria de Oliveira (2):
  UBUNTU: SAUCE: (no-up) virtio-scsi: Decrement reqs counter before SCSI
    command requeue
  UBUNTU: SAUCE: (no-up) virtio-scsi: (cosmetic) reestablish
    virtscsi_pick_vq_mq() signature

 drivers/scsi/virtio_scsi.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)


More information about the kernel-team mailing list