lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [syzbot] BUG: sleeping function called from invalid context in __might_resched
Date
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




\
 
 \ /
  Last update: 2021-11-12 18:16    [W:0.101 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site