Re: [bug report] scsi: smartpqi: Update device removal management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Whatever happened with this?

regards,
dan carpenter

On Fri, Dec 10, 2021 at 03:09:37PM +0000, Don.Brace@xxxxxxxxxxxxx wrote:
> 
> 
> ________________________________
> From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> 
> 
> Hello Don Brace,
> 
> The patch 819225b03dc7: "scsi: smartpqi: Update device removal
> management" from Sep 28, 2021, leads to the following Smatch static
> checker warning:
> 
>         drivers/scsi/scsi_sysfs.c:1463 __scsi_remove_device()
>         warn: sleeping in atomic context
> ----
> Dan,
> Thanks  for checking this.
> I have a patch to correct this. I'll be sending it up soon.
> 
> I am waiting for 1 more internal review.
> 
> Don Brace
> 
> 
> drivers/scsi/smartpqi/smartpqi_init.c
>   2510  static void pqi_remove_all_scsi_devices(struct pqi_ctrl_info *ctrl_info)
>   2511  {
>   2512          unsigned long flags;
>   2513          struct pqi_scsi_dev *device;
>   2514          struct pqi_scsi_dev *next;
>   2515
>   2516          spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags);
>                 ^^^^^^^^^^^^^^^^^^
> Takes a spinlock
> 
>   2517
>   2518          list_for_each_entry_safe(device, next, &ctrl_info->scsi_device_list,
>   2519                  scsi_device_list_entry) {
>   2520                  if (pqi_is_device_added(device))
>   2521                          pqi_remove_device(ctrl_info, device);
>                                 ^^^^^^^^^^^^^^^^^^
> This calls scsi_remove_device() which takes a mutex so it can sleep.
> 
>   2522                  list_del(&device->scsi_device_list_entry);
>   2523                  pqi_free_device(device);
>   2524          }
>   2525
>   2526          spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);
>   2527  }
> 
> regards,
> dan carpenter



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux