mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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 <[email protected]>
Bisected-by: Mike Christie <[email protected]>
Tested-by: Mike Christie <[email protected]>
Diagnosed-by: Nicholas Bellinger <[email protected]>
Fixes: e7942d0633 ("tcp: remove prequeue support")
Signed-off-by: Florian Westphal <[email protected]>
Cc: [email protected] # 4.14+
Signed-off-by: Nicholas Bellinger <[email protected]>