Re: [GIT PULL rcu/urgent] Fix two more 4.3 regressions

From: Sedat Dilek
Date: Mon Sep 28 2015 - 02:24:58 EST


On Mon, Sep 28, 2015 at 8:03 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> * Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
>
>> [ 23.874836] BUG: sleeping function called from invalid context at
>> kernel/workqueue.c:2678
>> [ 23.874902] in_atomic(): 0, irqs_disabled(): 1, pid: 1411, name: acpid
>>
>> $ grep LOCKDEP /boot/config-4.3.0-rc2-438.1-llvmlinux-amd64
>
> Was this kernel built with LLVM?
>
> If yes then please do not report it as 'bugs' to lkml, unless you can also
> reproduce it under GCC. Please bring it up with the LLVM folks.
>

My apologies for flooding the ML.

Yes, this kernel was build with LLVM.

This snippet makes the BUG line go away for me.

--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -731,6 +731,7 @@ void usbhid_close(struct hid_device *hid)
*/
spin_lock_irq(&usbhid->lock);
if (!--hid->open) {
+ trace_hardirqs_off();
spin_unlock_irq(&usbhid->lock);
hid_cancel_delayed_stuff(usbhid);
if (!(hid->quirks & HID_QUIRK_ALWAYS_POLL)) {
@@ -1392,6 +1393,8 @@ static void usbhid_disconnect(struct usb_interface *intf)

static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
{
+ might_sleep();
+
del_timer_sync(&usbhid->io_retry);
cancel_work_sync(&usbhid->reset_work);
}

What does this say to me?
HID problem?
CLANG problem?
Not sure, still digging into it.

- Sedat -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/