linux-brain/drivers/target
Florian Westphal c8d0f63c15 iscsi-target: make sure to wake up sleeping login worker
commit 1c130ae00b upstream.

Mike Christie reports:
  Starting in 4.14 iscsi logins will fail around 50% of the time.

Problem appears to be that iscsi_target_sk_data_ready() callback may
return without doing anything in case it finds the login work queue
is still blocked in sock_recvmsg().

Nicholas Bellinger says:
  It would indicate users providing their own ->sk_data_ready() callback
  must be responsible for waking up a kthread context blocked on
  sock_recvmsg(..., MSG_WAITALL), when a second ->sk_data_ready() is
  received before the first sock_recvmsg(..., MSG_WAITALL) completes.

So, do this and invoke the original data_ready() callback -- in
case of tcp sockets this takes care of waking the thread.

Disclaimer: I do not understand why this problem did not show up before
tcp prequeue removal.

(Drop WARN_ON usage - nab)

Reported-by: Mike Christie <mchristi@redhat.com>
Bisected-by: Mike Christie <mchristi@redhat.com>
Tested-by: Mike Christie <mchristi@redhat.com>
Diagnosed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Fixes: e7942d0633 ("tcp: remove prequeue support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Cc: stable@vger.kernel.org # 4.14+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:42:29 +01:00
..
iscsi iscsi-target: make sure to wake up sleeping login worker 2018-02-22 15:42:29 +01:00
loopback License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sbp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tcm_fc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig block: make scsi_request and scsi ioctl support optional 2017-01-31 10:53:05 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_alua.c fs: fix kernel_write prototype 2017-09-04 19:05:15 -04:00
target_core_alua.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_configfs.c target: export lio pgr/alua support as device attr 2017-07-10 20:05:27 -07:00
target_core_device.c target: Fix cmd size for PR-OUT in passthrough_parse_cdb 2017-07-09 20:58:49 -07:00
target_core_fabric_configfs.c target/configfs: Kill se_lun->lun_link_magic 2017-06-08 23:26:38 -07:00
target_core_fabric_lib.c target: Use {get,put}_unaligned_be*() instead of open coding these functions 2017-07-06 22:57:59 -07:00
target_core_file.c target/file: Do not return error for UNMAP if length is zero 2017-12-20 10:10:26 +01:00
target_core_file.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_hba.c target: Fix target_sense_desc_format NULL pointer dereference 2015-09-24 23:17:23 -07:00
target_core_iblock.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
target_core_iblock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_pr.c target:fix condition return in core_pr_dump_initiator_port() 2017-12-20 10:10:25 +01:00
target_core_pr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_pscsi.c block: fix blk_rq_append_bio 2018-01-02 20:31:05 +01:00
target_core_pscsi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_rd.c target: break up free_device callback 2017-07-06 23:11:37 -07:00
target_core_rd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_sbc.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-07-13 14:27:32 -07:00
target_core_spc.c target: Fix cmd size for PR-OUT in passthrough_parse_cdb 2017-07-09 20:58:49 -07:00
target_core_stat.c target: Add counters for ABORT_TASK success + failure 2017-02-26 16:21:06 -08:00
target_core_tmr.c target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2017-11-30 08:40:51 +00:00
target_core_tpg.c target: Fix node_acl demo-mode + uncached dynamic shutdown regression 2017-08-09 20:55:19 -07:00
target_core_transport.c target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2017-11-30 08:40:51 +00:00
target_core_ua.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_ua.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_user.c tcmu: free old string on reconfig 2017-07-30 15:23:21 -07:00
target_core_xcopy.c xcopy: loop over devices using idr helper 2017-07-06 23:11:40 -07:00
target_core_xcopy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00