Commit 76d54bf
nvme-tcp: don't access released socket during error recovery
While the error recovery work is temporarily failing reconnect attempts,
running the 'nvme list' command causes a kernel NULL pointer dereference
by calling getsockname() with a released socket.
During error recovery work, the nvme tcp socket is released and a new one
created, so it is not safe to access the socket without proper check.
Signed-off-by: Akinobu Mita <[email protected]>
Fixes: 02c57a8 ("nvme-tcp: print actual source IP address through sysfs "address" attr")
Reviewed-by: Martin Belanger <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>1 parent 51d24f7 commit 76d54bf
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2489 | 2489 | | |
2490 | 2490 | | |
2491 | 2491 | | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
2492 | 2496 | | |
2493 | 2497 | | |
2494 | 2498 | | |
2495 | 2499 | | |
2496 | 2500 | | |
2497 | 2501 | | |
2498 | 2502 | | |
| 2503 | + | |
| 2504 | + | |
2499 | 2505 | | |
2500 | 2506 | | |
2501 | 2507 | | |
| |||
0 commit comments