RE: [PATCH v1 14/15] mpt3sas: fix possible memory leak.
Yes Sasha, We like to have this patch included in a stable tree. Thanks, Sreekanth -Original Message- From: Sasha Levin [mailto:alexander.le...@microsoft.com] Sent: Tuesday, April 10, 2018 7:19 PM To: Sasha Levin; Chaitra P B; linux-scsi@vger.kernel.org Cc: sathya.prak...@broadcom.com; sreekanth.re...@broadcom.com; sta...@vger.kernel.org Subject: Re: [PATCH v1 14/15] mpt3sas: fix possible memory leak. Hi, [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 12.9808) The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127. v4.16.1: Build OK! v4.15.16: Build OK! v4.14.33: Build OK! v4.9.93: Build OK! v4.4.127: Build OK! Please let us know if you'd like to have this patch included in a stable tree. -- Thanks, Sasha
Re: [PATCH v1 14/15] mpt3sas: fix possible memory leak.
Hi, [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 12.9808) The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127. v4.16.1: Build OK! v4.15.16: Build OK! v4.14.33: Build OK! v4.9.93: Build OK! v4.4.127: Build OK! Please let us know if you'd like to have this patch included in a stable tree. -- Thanks, Sasha
[PATCH v1 14/15] mpt3sas: fix possible memory leak.
In ioctl exit path driver refers ioc_list to free memory associated with diag buffers and event_log pointer used to save events by driver. If ctl_exit() func is called after unregistering driver, then ioc_list will be empty and hence driver will not be able to free the allocated memory which in turn causes memory leak. So call ctl_exit() function before unregistering mpt3sas driver. Signed-off-by: Chaitra P BSigned-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index f3e1dc7..f8b5248 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -11283,10 +11283,10 @@ _mpt3sas_exit(void) pr_info("mpt3sas version %s unloading\n", MPT3SAS_DRIVER_VERSION); - pci_unregister_driver(_driver); - mpt3sas_ctl_exit(hbas_to_enumerate); + pci_unregister_driver(_driver); + scsih_exit(); } -- 1.8.3.1