From: Jia-Ju Bai <baijiaju1990@163.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: gregkh@linuxfoundation.org, johan@kernel.org, bjorn@mork.no,
mingo@kernel.org, oneukum@suse.com, viro@zeniv.linux.org.uk,
mark.rutland@arm.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()
Date: Tue, 11 Sep 2018 16:25:21 +0800 [thread overview]
Message-ID: <80bf95d7-7485-d74c-2e41-73bd358aa2c6@163.com> (raw)
In-Reply-To: <20180911074930.2g6ryk7qe46cijhi@linutronix.de>
On 2018/9/11 15:49, Sebastian Andrzej Siewior wrote:
> On 2018-09-01 16:12:10 [+0800], Jia-Ju Bai wrote:
>> wdm_in_callback() is a completion handler function for the USB driver.
>> So it should not sleep. But it calls service_outstanding_interrupt(),
>> which calls usb_submit_urb() with GFP_KERNEL.
> At which point does wdm_in_callback() invoke
> service_outstanding_interrupt()? I don't see it. I see one invocation
> from wdm_read() and another from service_interrupt_work().
>
> Also, if that would be the case, then spin_unlock_irq() in an USB
> completion handler (which might run in IRQ context with interrupts
> disabled) would be wrong.
Yes, you are right.
I checked an old kernel version Linux-4.16 and got this report.
The current code looks much different from the code that I checked.
Sorry for my false report, and thanks for your correction.
Best wishes,
Jia-Ju Bai
prev parent reply other threads:[~2018-09-11 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-01 8:12 Jia-Ju Bai
2018-09-11 7:49 ` Sebastian Andrzej Siewior
2018-09-11 8:00 ` [PATCH] Revert "usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()" Sebastian Andrzej Siewior
2018-09-11 8:25 ` Jia-Ju Bai [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=80bf95d7-7485-d74c-2e41-73bd358aa2c6@163.com \
--to=baijiaju1990@163.com \
--cc=baijiaju1990@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=bjorn@mork.no \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=oneukum@suse.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®