[Test Case]
Unplug a SATA disk from a SAS controller and insert a new SATA disk in its place.
[Regression Risk]
The fix is a clean cherry-pick from upstream that is tagged for stable. No subsequent patches in linux-next have a "Fixes:" marker referencing this patch, suggesting no regressions have been found since its introduction.
[Impact]
Hotplugging a SATA disk into a SAS controller may trigger a NULL pointer dereference, leading to a crash:
[ 2366.923208] Unable to handle kernel NULL pointer dereference 3b0>] sas_find_ dev_by_ rphy+0x48/ 0x118 4a8>] sas_target_ alloc+0x28/ 0x98 920>] scsi_alloc_ target+ 0x248/0x308 080>] __scsi_ add_device+ 0xb8/0x160 2d8>] ata_scsi_ scan_host+ 0x190/0x230 4b0>] ata_scsi_ hotplug+ 0xc8/0xe8 75c>] process_ one_work+ 0x164/0x438 b74>] worker_ thread+ 0x144/0x4b0 ffc>] kthread+0xfc/0x110
at virtual address 000007b8
...
[ 2368.766334] Call trace:
[ 2368.781712] [<ffffffc00065c
[ 2368.800394] [<ffffffc00065c
[ 2368.817975] [<ffffffc00063e
[ 2368.835570] [<ffffffc000640
[ 2368.853034] [<ffffffc0006e5
[ 2368.871614] [<ffffffc0006e5
[ 2368.889152] [<ffffffc0000da
[ 2368.908003] [<ffffffc0000da
[ 2368.924613] [<ffffffc0000e0
[Test Case]
Unplug a SATA disk from a SAS controller and insert a new SATA disk in its place.
[Regression Risk]
The fix is a clean cherry-pick from upstream that is tagged for stable. No subsequent patches in linux-next have a "Fixes:" marker referencing this patch, suggesting no regressions have been found since its introduction.