Re: [PATCH] usbhid: Fix lockdep unannotated irqs-off warning

From: Andy Lutomirski
Date: Mon Mar 07 2016 - 13:04:54 EST


On Mon, Mar 7, 2016 at 9:30 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Mon, 7 Mar 2016 18:24:12 +0100 (CET)
> Jiri Kosina <jikos@xxxxxxxxxx> wrote:
>
>> > So, if Clang is producing wrong X86 code here, is it possible to turn
>> > interrupts on/off manually? But, hmm that affects other places as well
>> > in the Linux sources, so.
>>
>> This issue needs to be handled in the compiler.
>>
>
> Exactly. The compiler may get away with this in userspace (maybe), but
> for the kernel, it is definitely a show stopper. Especially if it knows
> that an asm() may be called.

It's broken for user code that fiddles with AC, too.

--Andy