diff options
author | Douglas Miller <dougmill@linux.vnet.ibm.com> | 2017-10-20 15:17:22 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-31 13:06:07 +0100 |
commit | e2532b4af6366931e6f66b60338cf6b08a4b32ae (patch) | |
tree | 45d046e60b13c6690c62be29b032d7bdd25683a8 /arch/arm/boot/dts/kirkwood-dns325.dts | |
parent | scsi: Suppress a kernel warning in case the prep function returns BLKPREP_DEFER (diff) | |
download | linux-e2532b4af6366931e6f66b60338cf6b08a4b32ae.tar.xz linux-e2532b4af6366931e6f66b60338cf6b08a4b32ae.zip |
scsi: qla2xxx: Fix oops in qla2x00_probe_one error path
On error, kthread_create() returns an errno-encoded pointer, not NULL.
The routine qla2x00_probe_one() detects the error case and jumps to
probe_failed, but has already assigned the return value from
kthread_create() to ha->dpc_thread. Then probe_failed checks to see if
ha->dpc_thread is not NULL before doing cleanup on it. Since in the
error case this is also not NULL, it ends up trying to access an invalid
task pointer.
Solution is to assign NULL to ha->dpc_thread in the error path to avoid
kthread cleanup in that case.
Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'arch/arm/boot/dts/kirkwood-dns325.dts')
0 files changed, 0 insertions, 0 deletions