]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] iscsi_tcp: fix relogin/shutdown hang
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 31 Mar 2010 19:41:35 +0000 (14:41 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 18:28:13 +0000 (13:28 -0500)
commit749ed2efa37e9f3d5c682ec2c202f5ec77c3137d
tree9c23e54b6e843a7eed97e96073c54348d609e95f
parent3ed702b34514be8e03aa325b4ffb3e5bdfdffc7c
[SCSI] iscsi_tcp: fix relogin/shutdown hang

When I made this patch:
17555eeb7e15fc1fed8e9567b046db8d6992fa2a
it was to solve a problem where we were already on the waitqueue
becuase a connection problem/logout caused us to be on there
when we were cleaning up the session. If we happen to get
on queue for more normal reasons like their just does not happen
to be any send space at the same time we are closing the connection
we hit a race and get stuck in the wait.

We should not check if the waitqueue is active
because we could race with the network code. If
the network xmit code is just about to enter the
prepare to wait when we check for the waitqueue to
be active then we will miss each other and the
network code will fall into the wait and we will
not run wake_up.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/iscsi_tcp.c