android_kernel_oneplus_msm8998/include/scsi
Chris Leech 246760c61d scsi: libiscsi: add lock around task lists to fix list corruption regression
commit 6f8830f5bbab16e54f261de187f3df4644a5b977 upstream.

There's a rather long standing regression from the commit "libiscsi:
Reduce locking contention in fast path"

Depending on iSCSI target behavior, it's possible to hit the case in
iscsi_complete_task where the task is still on a pending list
(!list_empty(&task->running)).  When that happens the task is removed
from the list while holding the session back_lock, but other task list
modification occur under the frwd_lock.  That leads to linked list
corruption and eventually a panicked system.

Rather than back out the session lock split entirely, in order to try
and keep some of the performance gains this patch adds another lock to
maintain the task lists integrity.

Major enterprise supported kernels have been backing out the lock split
for while now, thanks to the efforts at IBM where a lab setup has the
most reliable reproducer I've seen on this issue.  This patch has been
tested there successfully.

Signed-off-by: Chris Leech <cleech@redhat.com>
Fixes: 659743b02c ("[SCSI] libiscsi: Reduce locking contention in fast path")
Reported-by: Prashantha Subbarao <psubbara@us.ibm.com>
Reviewed-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-26 12:13:19 +02:00
..
fc
fc_encode.h
fc_frame.h
fcoe_sysfs.h
iscsi_if.h
iscsi_proto.h
libfc.h scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
libfcoe.h
libiscsi.h scsi: libiscsi: add lock around task lists to fix list corruption regression 2017-03-26 12:13:19 +02:00
libiscsi_tcp.h
libsas.h Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-18 05:56:29 -08:00
osd_attributes.h
osd_initiator.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
osd_ore.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
osd_protocol.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
osd_sec.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
osd_sense.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
osd_types.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
sas.h
sas_ata.h
scsi.h Move code that is used both by initiator and target drivers 2015-06-01 07:32:43 -07:00
scsi_bsg_iscsi.h
scsi_cmnd.h scsi: stop passing a gfp_mask argument down the command setup path 2014-11-24 19:56:55 +01:00
scsi_common.h scsi: Protect against buffer possible overflow in scsi_set_sense_information 2015-07-23 22:53:05 -07:00
scsi_dbg.h scsi: Conditionally compile in constants.c 2015-01-09 15:44:31 +01:00
scsi_device.h scsi: use 'scsi_device_from_queue()' for scsi_dh 2017-03-12 06:37:26 +01:00
scsi_devinfo.h SCSI: add 1024 max sectors black list flag 2015-04-27 09:38:06 -07:00
scsi_dh.h scsi_dh: kill struct scsi_dh_data 2015-08-28 13:14:57 -07:00
scsi_driver.h scsi: remove scsi_driver owner field 2014-11-24 20:01:28 +01:00
scsi_eh.h Revert "libata-eh: Set 'information' field for autosense" 2015-08-03 11:41:33 -04:00
scsi_host.h Merge branch 'mkp-fixes' into fixes 2015-12-03 09:32:33 -08:00
scsi_ioctl.h scsi: split scsi_nonblockable_ioctl 2014-11-12 11:16:11 +01:00
scsi_proto.h Split SCSI header files 2015-06-01 07:32:42 -07:00
scsi_tcq.h scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
scsi_transport.h
scsi_transport_fc.h scsi_transport_fc: Add support for 25Gbit speed 2015-04-10 07:40:32 -07:00
scsi_transport_iscsi.h iSCSI: let session recovery_tmo sysfs writes persist across recovery 2015-07-30 12:43:00 -07:00
scsi_transport_sas.h
scsi_transport_spi.h scsi: remove abuses of scsi_populate_tag 2014-11-12 11:19:41 +01:00
scsi_transport_srp.h IB/srp: Avoid using uninitialized variable 2015-07-14 13:20:09 -04:00
scsicam.h
sg.h scsi: add SG_SCSI_RESET_NO_ESCALATE flag to SG_SCSI_RESET ioctl 2014-11-12 11:15:54 +01:00
srp.h IB/srp: Add 64-bit LUN support 2015-05-18 13:35:56 -04:00