diff mbox series

mpt3sas: suppress a warning in debug kernel

Message ID 20231009152730.14925-1-thenzl@redhat.com
State New
Headers show
Series mpt3sas: suppress a warning in debug kernel | expand

Commit Message

Tomas Henzl Oct. 9, 2023, 3:27 p.m. UTC
The mpt3sas_ctl_exit should be called after communication
with the controller stops but in the current place it may cause
false warnings about memory not released.
Fix it by moving the call right after mpt3sas_base_detach.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Tomas Henzl Oct. 10, 2023, 9:01 a.m. UTC | #1
There might be an issue related to this patch, I shall post a modified V2.

Please drop this patch.

On 10/9/23 17:27, Tomas Henzl wrote:
> The mpt3sas_ctl_exit should be called after communication
> with the controller stops but in the current place it may cause
> false warnings about memory not released.
> Fix it by moving the call right after mpt3sas_base_detach.
> 
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index c3c1f466fe01..9af7a7e24474 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -11350,6 +11350,7 @@ static void scsih_remove(struct pci_dev *pdev)
>  	}
>  
>  	mpt3sas_base_detach(ioc);
> +	mpt3sas_ctl_exit(hbas_to_enumerate);
>  	spin_lock(&gioc_lock);
>  	list_del(&ioc->list);
>  	spin_unlock(&gioc_lock);
> @@ -12931,8 +12932,6 @@ _mpt3sas_exit(void)
>  
>  	pci_unregister_driver(&mpt3sas_driver);
>  
> -	mpt3sas_ctl_exit(hbas_to_enumerate);
> -
>  	scsih_exit();
>  }
>
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index c3c1f466fe01..9af7a7e24474 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -11350,6 +11350,7 @@  static void scsih_remove(struct pci_dev *pdev)
 	}
 
 	mpt3sas_base_detach(ioc);
+	mpt3sas_ctl_exit(hbas_to_enumerate);
 	spin_lock(&gioc_lock);
 	list_del(&ioc->list);
 	spin_unlock(&gioc_lock);
@@ -12931,8 +12932,6 @@  _mpt3sas_exit(void)
 
 	pci_unregister_driver(&mpt3sas_driver);
 
-	mpt3sas_ctl_exit(hbas_to_enumerate);
-
 	scsih_exit();
 }