Messages in this thread | | | From | "Fabio M. De Francesco" <> | Subject | Re: [syzbot] BUG: sleeping function called from invalid context in __might_resched | Date | Fri, 12 Nov 2021 18:15:44 +0100 |
| |
On Friday, November 12, 2021 5:27:51 PM CET Marco Elver wrote:
> My guess is that in this case '!preemptible()' could work: > > #define preemptible() (preempt_count() == 0 && ! irqs_disabled()) > > But still am not entirely sure. > > Thanks, > -- Marco
Oh, I didn't even know that we have that preemptible() macro.
Instead, I should have known that in_atomic() won't do, since last week I had copy-pasted in an email that I sent to someone on the LKML exactly the same inline documentation that you have showed now.
Thanks, Marco. At least, this thread was useful to make me recall how these macros should be used :)
Regards,
Fabio
| |