Re: __might_sleep() warnings on v3.19-rc6

From: Linus Torvalds
Date: Mon Feb 02 2015 - 00:08:20 EST


On Sun, Feb 1, 2015 at 3:03 PM, NeilBrown <neilb@xxxxxxx> wrote:
>
> I guess I could
> __set_current_state(TASK_RUNNING);
> somewhere to defeat the warning, and add a comment explaining why.
>
> Would that be a good thing?

Use "sched_annotate_sleep()" instead, but yes, add a comment about why it's ok.

Linus
--
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/