From: Dan Carpenter <dan.carpenter@oracle.com>
To: don.brace@microchip.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: smartpqi: Update device removal management
Date: Fri, 10 Dec 2021 17:18:51 +0300 [thread overview]
Message-ID: <20211210141851.GA18906@kili> (raw)
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
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
next reply other threads:[~2021-12-10 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 14:18 Dan Carpenter [this message]
[not found] ` <SN6PR11MB28480A37EF56FEABD76481CAE1719@SN6PR11MB2848.namprd11.prod.outlook.com>
2022-01-19 11:02 ` [bug report] scsi: smartpqi: Update device removal management Dan Carpenter
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=20211210141851.GA18906@kili \
--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;
as well as URLs for NNTP newsgroup(s).