Commit 15924b0
scsi: fnic: Replace sgreset tag with max_tag_id
sgreset is issued with a SCSI command pointer. The device reset code
assumes that it was issued on a hardware queue, and calls block multiqueue
layer. However, the assumption is broken, and there is no hardware queue
associated with the sgreset, and this leads to a crash due to a null
pointer exception.
Fix the code to use the max_tag_id as a tag which does not overlap with the
other tags issued by mid layer.
Tested by running FC traffic for a few minutes, and by issuing sgreset on
the device in parallel. Without the fix, the crash is observed right away.
With this fix, no crash is observed.
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://lore.kernel.org/r/20230817182146.229059-1-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 530e86c commit 15924b0
2 files changed
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | | - | |
2224 | 2223 | | |
2225 | 2224 | | |
2226 | 2225 | | |
| |||
2250 | 2249 | | |
2251 | 2250 | | |
2252 | 2251 | | |
2253 | | - | |
2254 | 2252 | | |
2255 | 2253 | | |
2256 | 2254 | | |
2257 | | - | |
2258 | | - | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
2259 | 2260 | | |
2260 | | - | |
2261 | | - | |
2262 | | - | |
2263 | | - | |
| 2261 | + | |
| 2262 | + | |
2264 | 2263 | | |
2265 | 2264 | | |
2266 | 2265 | | |
| |||
2432 | 2431 | | |
2433 | 2432 | | |
2434 | 2433 | | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
| 2434 | + | |
| 2435 | + | |
2438 | 2436 | | |
2439 | 2437 | | |
2440 | 2438 | | |
| |||
0 commit comments