]> 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:23:52 +0000 (12:23 +0200)
commitd4959d09b76eb7a4146f5133962b88d3bddb63d6
treee691e823e3f797130315c43c9c2c865fef07d4d3
parent985abab0e740a0a9d659c2355c189d76f570d385
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