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

From: Sedat Dilek
Date: Wed Mar 02 2016 - 04:11:54 EST


On 3/2/16, Jiri Kosina <jikos@xxxxxxxxxx> wrote:
> On Wed, 2 Mar 2016, Sedat Dilek wrote:
>>
>> static bool start_flush_work(struct work_struct *work, struct wq_barrier
>> *barr)
>> {
>> struct worker *worker = NULL;
>> struct worker_pool *pool;
>> struct pool_workqueue *pwq;
>>
>> might_sleep();
>>
>> local_irq_disable();
>> pool = get_work_pool(work);
>> if (!pool) {
>> local_irq_enable();
>> return false;
>> }
>>
>> spin_lock(&pool->lock); <--- XXX: spin_lock_irq() ???
>
> No, this is fine. IRQs are unconditionally disabled a few lines above.
>

You are right, I tried with a substitution and that does not matter.

What about passing flags to local_irq_XXX?
And how do I do that?

- Sedat -

> --
> Jiri Kosina
> SUSE Labs
>
>