From: Oliver Neukum <oliver@neukum.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@linux.intel.com>,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:USB ATTACHED SCSI" <linux-scsi@vger.kernel.org>,
"open list:USB MASS STORAGE..."
<usb-storage@lists.one-eyed-alien.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] uas: add dead request list
Date: Thu, 05 Sep 2013 09:26:35 +0200 [thread overview]
Message-ID: <1378365995.4058.18.camel@linux-fkkt.site> (raw)
In-Reply-To: <1378121129-32594-5-git-send-email-kraxel@redhat.com>
On Mon, 2013-09-02 at 13:25 +0200, Gerd Hoffmann wrote:
> +static void uas_zap_dead(struct uas_dev_info *devinfo)
> +{
> + struct uas_cmd_info *cmdinfo;
> + struct uas_cmd_info *temp;
> + struct list_head list;
> + unsigned long flags;
> +
> + spin_lock_irq(&uas_lists_lock);
> + list_replace_init(&uas_dead_list, &list);
> + spin_unlock_irq(&uas_lists_lock);
This looks like a window for a race.
> + spin_lock_irqsave(&devinfo->lock, flags);
> + list_for_each_entry_safe(cmdinfo, temp, &list, dead) {
> +
What happens if list entries are on the private list, when
the function is called for another device? It looks to me like
the di==devinfo test could put them back on the list although
they would need to be canceled.
Regards
Oliver
next prev parent reply other threads:[~2013-09-05 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1378121129-32594-1-git-send-email-kraxel@redhat.com>
2013-09-02 11:25 ` [PATCH 2/5] uas: properly reinitialize in uas_eh_bus_reset_handler Gerd Hoffmann
2013-09-02 11:25 ` [PATCH 3/5] uas: rename work list lock + list field Gerd Hoffmann
2013-09-02 11:25 ` [PATCH 4/5] uas: add dead request list Gerd Hoffmann
2013-09-03 17:39 ` Sarah Sharp
2013-09-04 7:04 ` Gerd Hoffmann
2013-09-05 7:26 ` Oliver Neukum [this message]
[not found] <1378216005-10326-1-git-send-email-kraxel@redhat.com>
2013-09-03 13:46 ` Gerd Hoffmann
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=1378365995.4058.18.camel@linux-fkkt.site \
--to=oliver@neukum.org \
--cc=gregkh@linuxfoundation.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=sarah.a.sharp@linux.intel.com \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=willy@linux.intel.com \
/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).