Commit 2fa8961
nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready()
When the socket is closed while in TCP_LISTEN a callback is run to
flush all outstanding packets, which in turns calls
nvmet_tcp_listen_data_ready() with the sk_callback_lock held.
So we need to check if we are in TCP_LISTEN before attempting
to get the sk_callback_lock() to avoid a deadlock.
Link: https://lore.kernel.org/linux-nvme/CAHj4cs-zu7eVB78yUpFjVe2UqMWFkLk8p+DaS3qj+uiGCXBAoA@mail.gmail.com/
Tested-by: Yi Zhang <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: Keith Busch <[email protected]>1 parent d1877cc commit 2fa8961
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2004 | 2004 | | |
2005 | 2005 | | |
2006 | 2006 | | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
2007 | 2010 | | |
2008 | 2011 | | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
| 2012 | + | |
2013 | 2013 | | |
2014 | | - | |
2015 | 2014 | | |
2016 | 2015 | | |
2017 | 2016 | | |
| |||
0 commit comments