public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Don.Brace@microchip.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [bug report] scsi: smartpqi: Update device removal management
Date: Wed, 19 Jan 2022 14:02:33 +0300	[thread overview]
Message-ID: <20220119110233.GA1978@kadam> (raw)
In-Reply-To: <SN6PR11MB28480A37EF56FEABD76481CAE1719@SN6PR11MB2848.namprd11.prod.outlook.com>


Whatever happened with this?

regards,
dan carpenter

On Fri, Dec 10, 2021 at 03:09:37PM +0000, Don.Brace@microchip.com wrote:
> 
> 
> ________________________________
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> 
> 
> 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

      parent reply	other threads:[~2022-01-19 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 14:18 [bug report] scsi: smartpqi: Update device removal management Dan Carpenter
     [not found] ` <SN6PR11MB28480A37EF56FEABD76481CAE1719@SN6PR11MB2848.namprd11.prod.outlook.com>
2022-01-19 11:02   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220119110233.GA1978@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Don.Brace@microchip.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox