From: Oliver Neukum <oneukum@suse.de>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: "usb_wwan: error case of resume" (16871dcac) is buggy
Date: Mon, 21 Mar 2011 10:11:07 +0100 [thread overview]
Message-ID: <201103211011.07282.oneukum@suse.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1103210130260.19969@pobox.suse.cz>
Am Montag, 21. März 2011, 01:36:45 schrieb Jiri Kosina:
> Hi,
>
> the commit in subject make the kernel with CONFIG_PM_RUNTIME unset fail
> during compilation, as struct dev_pm_info doesn't have whole bunch of
> members in such case.
>
> The commit in question adds this code:
>
> /* we have to throw away the rest */
> do {
> unbusy_queued_urb(urb, portdata);
> //extremely dirty
> atomic_dec(&port->serial->interface->dev.power.usage_count);
> } while ((urb = usb_get_from_anchor(&portdata->delayed)));
>
> The 'extermely dirty' comment makes me a bit nervous whether the patch
> below is correct or some more thinking would be necessary.
I've since posted a clean patch, although your fix looks correct to me.
The problem was that I was unsure about the locking during resume().
I rather wrote a layering violation than risk a deadlock in an error path
hard to test. But I did not feel well doing it.
Regards
Oliver
next prev parent reply other threads:[~2011-03-21 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 0:36 "usb_wwan: error case of resume" (16871dcac) is buggy Jiri Kosina
2011-03-21 0:41 ` Jiri Kosina
2011-03-21 1:01 ` Randy Dunlap
2011-03-21 9:11 ` Oliver Neukum [this message]
2011-03-21 14:09 ` Alan Stern
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=201103211011.07282.oneukum@suse.de \
--to=oneukum@suse.de \
--cc=gregkh@suse.de \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.