]> git.ipfire.org Git - thirdparty/linux.git/commit
scsi: mpi3mr: Fix potential deadlock in mpi3mr_fault_uevent_emit
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>
Fri, 24 Jul 2026 17:52:31 +0000 (23:22 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 29 Jul 2026 02:05:42 +0000 (22:05 -0400)
commitccff8c92571500fcfed21281e33daaf645bf692f
tree5f760053cc771d9b388515a952f15ab357f9dad5
parenta8ddfd2425bbbafadae8700d63ed8a61a4109878
scsi: mpi3mr: Fix potential deadlock in mpi3mr_fault_uevent_emit

mpi3mr_fault_uevent_emit() runs from the fault watchdog and reset paths
where host I/O may already be blocked. GFP_KERNEL allocations here, both
the local kzalloc_obj() and the ones inside kobject_uevent_env() itself,
can trigger reclaim that waits on that blocked I/O and deadlock.

Use memalloc_noio_save()/restore() to cover the whole call instead of
just the local allocation.

Fixes: ec54b348f274 ("scsi: mpi3mr: Record and report controller firmware faults")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260724164630.924288-1-chandrakanth.patil%40broadcom.com
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260724175231.935192-1-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_fw.c