linux-stable/include
Nicholas Bellinger befb0ab8d1 target: Re-instate sess_wait_list for target_wait_for_sess_cmds
commit 9b31a328e3 upstream.

Switch back to pre commit 1c7b13fe65 list splicing logic for active I/O
shutdown with tcm_qla2xxx + ib_srpt fabrics.

The original commit was done under the incorrect assumption that it's safe to
walk se_sess->sess_cmd_list unprotected in target_wait_for_sess_cmds() after
sess->sess_tearing_down = 1 has been set by target_sess_cmd_list_set_waiting()
during session shutdown.

So instead of adding sess->sess_cmd_lock protection around sess->sess_cmd_list
during target_wait_for_sess_cmds(), switch back to sess->sess_wait_list to
allow wait_for_completion() + TFO->release_cmd() to occur without having to
walk ->sess_cmd_list after the list_splice.

Also add a check to exit if target_sess_cmd_list_set_waiting() has already
been called, and add a WARN_ON to check for any fabric bug where new se_cmds
are added to sess->sess_cmd_list after sess->sess_tearing_down = 1 has already
been set.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Joern Engel <joern@logfs.org>
Cc: Roland Dreier <roland@kernel.org>
Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-07 12:53:35 -07:00
..
acpi ACPI / PM: Allow device power states to be used for CONFIG_PM unset 2013-06-07 12:53:23 -07:00
asm-generic mm: allow arch code to control the user page table ceiling 2013-05-07 20:33:09 -07:00
clocksource ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
crypto
drm drm/radeon: add new richland pci ids 2013-05-11 07:18:35 -07:00
keys
linux cgroup: fix a subtle bug in descendant pre-order walk 2013-06-07 12:53:07 -07:00
math-emu
media [media] media: ov7670: Add possibility to disable pixclk during hblank 2013-02-08 14:35:06 -02:00
memory
misc
net ipv6: do not clear pinet6 field 2013-05-19 11:38:38 -07:00
pcmcia
ras edac: add support for error type "Info" 2013-02-21 14:16:27 -03:00
rdma IB/core: Add "type 2" memory windows support 2013-02-21 11:51:45 -08:00
rxrpc
scsi libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config} 2013-03-25 16:03:03 -07:00
sound ALSA: emu10k1: Fix dock firmware loading 2013-05-07 20:33:09 -07:00
target target: Re-instate sess_wait_list for target_wait_for_sess_cmds 2013-06-07 12:53:35 -07:00
trace Revert "block: add missing block_bio_complete() tracepoint" 2013-04-18 09:00:26 -07:00
uapi virtio_console: fix uapi header 2013-05-24 11:36:03 -07:00
video ARM: at91: fix LCD-wiring mode 2013-03-13 11:05:04 +01:00
xen for-linus-20130331 2013-03-31 11:38:59 -07:00
Kbuild UAPI: Remove empty Kbuild files 2013-01-02 17:36:10 -08:00