Commit 921d439
qla2xxx: Fix stale pointer access.
commit cb43285 upstream.
[ Upstream Commit 84e32a0 ]
Commit 84e32a0 ("qla2xxx: Use pci_enable_msix_range() instead of
pci_enable_msix()") introduced a regression when target mode is enabled.
In qla24xx_enable_msix(), ha->max_rsp_queues was incorrectly set
to a value higher than the number of response queues allocated causing
an invalid dereference. Specifically here in qla2x00_init_rings():
*rsp->in_ptr = 0;
Add additional check to make sure the pointer is valid. following
call stack will be seen
---- 8< ----
RIP: 0010:[<ffffffffa02ccadc>] [<ffffffffa02ccadc>] qla2x00_init_rings+0xdc/0x320 [qla2xxx]
RSP: 0018:ffff880429447dd8 EFLAGS: 00010082
....
Call Trace:
[<ffffffffa02ceb40>] qla2x00_abort_isp+0x170/0x6b0 [qla2xxx]
[<ffffffffa02c6f77>] qla2x00_do_dpc+0x357/0x7f0 [qla2xxx]
[<ffffffffa02c6c20>] ? qla2x00_relogin+0x260/0x260 [qla2xxx]
[<ffffffff8107d2c9>] kthread+0xc9/0xe0
[<ffffffff8107d200>] ? flush_kthread_worker+0x90/0x90
[<ffffffff8172cc6f>] ret_from_fork+0x3f/0x70
[<ffffffff8107d200>] ? flush_kthread_worker+0x90/0x90
---- 8< ----
Signed-off-by: Quinn Tran <[email protected]>
Signed-off-by: Himanshu Madhani <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 44c7d76 commit 921d439
File tree
5 files changed
+31
-9
lines changed- drivers/scsi/qla2xxx
5 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2192 | 2192 | | |
2193 | 2193 | | |
2194 | 2194 | | |
2195 | | - | |
| 2195 | + | |
2196 | 2196 | | |
2197 | 2197 | | |
2198 | 2198 | | |
| |||
2209 | 2209 | | |
2210 | 2210 | | |
2211 | 2211 | | |
2212 | | - | |
| 2212 | + | |
2213 | 2213 | | |
2214 | 2214 | | |
2215 | 2215 | | |
| |||
4961 | 4961 | | |
4962 | 4962 | | |
4963 | 4963 | | |
4964 | | - | |
| 4964 | + | |
4965 | 4965 | | |
4966 | 4966 | | |
4967 | 4967 | | |
| |||
4976 | 4976 | | |
4977 | 4977 | | |
4978 | 4978 | | |
4979 | | - | |
4980 | | - | |
| 4979 | + | |
| 4980 | + | |
4981 | 4981 | | |
4982 | 4982 | | |
4983 | 4983 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3018 | 3018 | | |
3019 | 3019 | | |
3020 | 3020 | | |
| 3021 | + | |
| 3022 | + | |
3021 | 3023 | | |
3022 | | - | |
3023 | | - | |
3024 | 3024 | | |
3025 | 3025 | | |
3026 | 3026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
400 | 403 | | |
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
407 | 413 | | |
408 | 414 | | |
409 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
| |||
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
411 | 419 | | |
412 | 420 | | |
413 | 421 | | |
| |||
634 | 642 | | |
635 | 643 | | |
636 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
637 | 649 | | |
638 | 650 | | |
639 | 651 | | |
| |||
645 | 657 | | |
646 | 658 | | |
647 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
648 | 664 | | |
649 | 665 | | |
650 | 666 | | |
| |||
0 commit comments