Commit aa1d7e1
ionic: catch NULL pointer issue on reconfig
It's possible that the driver will dereference a qcq that doesn't exist
when calling ionic_reconfigure_queues(), which causes a page fault BUG.
If a reduction in the number of queues is followed by a different
reconfig such as changing the ring size, the driver can hit a NULL
pointer when trying to clean up non-existent queues.
Fix this by checking to make sure both the qcqs array and qcq entry
exists bofore trying to use and free the entry.
Fixes: 101b40a ("ionic: change queue count with no reset")
Signed-off-by: Brett Creeley <brett@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Link: https://lore.kernel.org/r/20221017233123.15869-1-snelson@pensando.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent d8b5713 commit aa1d7e1
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2817 | 2817 | | |
2818 | 2818 | | |
2819 | 2819 | | |
2820 | | - | |
2821 | | - | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
2822 | 2824 | | |
2823 | | - | |
2824 | | - | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
2825 | 2829 | | |
2826 | 2830 | | |
2827 | 2831 | | |
| |||
0 commit comments