scsi: pm8001: Drop !task check in pm8001_abort_task()
Subsystems (2)
PATCH 1/1 scsi: pm8001: Drop !task check in pm8001_abort_task()
In commit 0b639decf651 ("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer in pm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot.
Function pm8001_abort_task() should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code.
drivers/scsi/pm8001/pm8001_sas.c +1 -1
@@ -979,7 +979,7 @@ int pm8001_abort_task(struct sas_task *task)u32 phy_id, port_id;struct sas_task_slow slow_task; -if (unlikely (!task || !task->lldd_task || !task->dev)) +if (!task->lldd_task || !task->dev)return TMF_RESP_FUNC_FAILED ; dev = task->dev;
Signature · 1 line
2.25.1
Quoted 6 lines · John Garry
In commit
0b639decf651("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer inpm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot.
Quoted 7 lines
Function
pm8001_abort_task()should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code.Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by John Garry <[email protected]>
Quoted 17 lines
drivers/scsi/pm8001/pm8001_sas.c +1
-2@@ -979,7 +979,7 @@ int pm8001_abort_task(struct sas_task *task)u32 phy_id, port_id;struct sas_task_slow slow_task; -if (unlikely (!task || !task->lldd_task || !task->dev)) +if (!task->lldd_task || !task->dev)return TMF_RESP_FUNC_FAILED ; dev = task->dev; --2.25.1
Quoted 18 lines · John Garry
In commit
0b639decf651("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer inpm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot.Function
pm8001_abort_task()should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code.Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by John Garry <[email protected]>drivers/scsi/pm8001/pm8001_sas.c +0
-0
drivers/scsi/pm8001/pm8001_sas.c int pm8001_abort_task(struct sas_task *task) · line 985
Quoted 8 lines
drivers/scsi/pm8001/pm8001_sas.c +1
-1@@ -979,7 +979,7 @@ int pm8001_abort_task(struct sas_task *task)u32 phy_id, port_id;struct sas_task_slow slow_task; -if (unlikely (!task || !task->lldd_task || !task->dev)) +if (!task->lldd_task || !task->dev)return TMF_RESP_FUNC_FAILED ; dev = task->dev;
Signature · 2 lines
Damien Le Moal Western Digital Research
Martin K. Petersen
AppliedJohn,
Quoted 8 lines
In commit
0b639decf651("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer inpm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot.Function
pm8001_abort_task()should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code.
Applied to 6.2/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 10 lines · John Garry
In commit
0b639decf651("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer inpm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot.Function
pm8001_abort_task()should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code.[...]
Applied to 6.2/scsi-queue, thanks!
[1/1] scsi: pm8001: Drop !task check in pm8001_abort_task()
https://git.kernel.org/mkp/scsi/c/4481bdc677c1
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering