diff mbox series

[smartpqi,updates,V2,8/9] smartpqi: fix isr accessing uninitialized data

Message ID 20210713210243.40594-9-don.brace@microchip.com
State Superseded
Headers show
Series smartpqi updates | expand

Commit Message

Don Brace July 13, 2021, 9:02 p.m. UTC
From: Mike McGowen <mike.mcgowen@microchip.com>

Correct driver's ISR accessing a data structure member
that has not been fully initialized during driver
initialization.
  - The pqi queue groups can have uninitialized members
    when an interrupt fires. This has not resulted in
    any driver crashes. This was found during our own
    internal testing. No bugs were ever filed.

Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

John Donnelly July 14, 2021, 1:16 a.m. UTC | #1
On 7/13/21 4:02 PM, Don Brace wrote:
> From: Mike McGowen <mike.mcgowen@microchip.com>

> 

> Correct driver's ISR accessing a data structure member

> that has not been fully initialized during driver

> initialization.

>    - The pqi queue groups can have uninitialized members

>      when an interrupt fires. This has not resulted in

>      any driver crashes. This was found during our own

>      internal testing. No bugs were ever filed.

> 

> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>

> Reviewed-by: Scott Benesh <scott.benesh@microchip.com>

> Reviewed-by: Scott Teel <scott.teel@microchip.com>

> Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com>

> Signed-off-by: Don Brace <don.brace@microchip.com>



Acked-by : John Donnelly <john.p.donnelly@oracle.com>

> ---

>   drivers/scsi/smartpqi/smartpqi_init.c | 4 ++--

>   1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c

> index f0e84354f782..ab1c9c483478 100644

> --- a/drivers/scsi/smartpqi/smartpqi_init.c

> +++ b/drivers/scsi/smartpqi/smartpqi_init.c

> @@ -7760,11 +7760,11 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)

>   

>   	pqi_init_operational_queues(ctrl_info);

>   

> -	rc = pqi_request_irqs(ctrl_info);

> +	rc = pqi_create_queues(ctrl_info);

>   	if (rc)

>   		return rc;

>   

> -	rc = pqi_create_queues(ctrl_info);

> +	rc = pqi_request_irqs(ctrl_info);

>   	if (rc)

>   		return rc;

>   

>
diff mbox series

Patch

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index f0e84354f782..ab1c9c483478 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -7760,11 +7760,11 @@  static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)
 
 	pqi_init_operational_queues(ctrl_info);
 
-	rc = pqi_request_irqs(ctrl_info);
+	rc = pqi_create_queues(ctrl_info);
 	if (rc)
 		return rc;
 
-	rc = pqi_create_queues(ctrl_info);
+	rc = pqi_request_irqs(ctrl_info);
 	if (rc)
 		return rc;