]> git.itanic.dy.fi Git - linux-stable/commit
scsi: mpt3sas: Fix use-after-free warning
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Tue, 6 Sep 2022 13:49:08 +0000 (19:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:17:05 +0000 (12:17 +0200)
commit82efb917eeb27454dc4c6fe26432fc8f6c75bc16
tree77a37b3d233dc235d410a14361a93eae3a81605b
parentebfb744bb6036485dac2a45c46e82b911c3726d1
scsi: mpt3sas: Fix use-after-free warning

commit 991df3dd5144f2e6b1c38b8d20ed3d4d21e20b34 upstream.

Fix the following use-after-free warning which is observed during
controller reset:

refcount_t: underflow; use-after-free.
WARNING: CPU: 23 PID: 5399 at lib/refcount.c:28 refcount_warn_saturate+0xa6/0xf0

Link: https://lore.kernel.org/r/20220906134908.1039-2-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/mpt3sas/mpt3sas_scsih.c