diff options
| author | Shao Mingyin <shao.mingyin@zte.com.cn> | 2026-10-26 19:54:09 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-11-08 21:20:31 -0500 |
| commit | 46846939d5f33c9333612662c52475f92e753407 (patch) | |
| tree | 808a20d06a3b7c47fb4d15a2fab14d0ada11d133 /tools/perf/scripts/python | |
| parent | c0bb6614132c64205a3c40c32dc1494c1bfeffe1 (diff) | |
scsi: rdac: Keep the error status when controller lookup fails
initialize_controller() records SCSI_DH_RES_TEMP_UNAVAIL when
get_controller() fails, but then overwrites it with SCSI_DH_OK
unconditionally. It therefore reports success with h->ctlr == NULL and
rdac_bus_attach() continues with check_ownership(), which dereferences
h->ctlr:
BUG: kernel NULL pointer dereference, address: 0000000000000000
...
check_ownership
rdac_bus_attach
get_controller() only fails when its GFP_ATOMIC allocation fails, so the
crash happens exactly when memory is already scarce.
Only report success after the controller was found and the device was added
to its list.
Fixes: 327825574132 ("scsi_dh_rdac: switch to scsi_execute_req_flags()")
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261026195409354OWEI2b6HO7swSphvv1FOc@zte.com.cn
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
