lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 11 Sep 2018 16:25:21 +0800
From:   Jia-Ju Bai <baijiaju1990@....com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Jia-Ju Bai <baijiaju1990@...il.com>
Cc:     gregkh@...uxfoundation.org, johan@...nel.org, bjorn@...k.no,
        mingo@...nel.org, oneukum@...e.com, viro@...iv.linux.org.uk,
        mark.rutland@....com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: cdc-wdm: Fix a sleep-in-atomic-context bug in
 service_outstanding_interrupt()



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ