lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: in_atomic() misuse all over the place
On Wed 2009-01-28 00:10:37, Roger Larsson wrote:
> (resent, non html)
>
> [1.] One line summary of the problem:
> in_atomic() is used to select path of execution, most likely to suppress
> warning logs when running a preemptive kernel.
>
> [2.] Full description of the problem/report:
>
> The problem is that in_atomic() only works on preemptive kernels...
>
> Result: preemptive kernel warns about a potential deadlock in all kernels,
> developer silence with the help of in_atomic()
> bug remains in SMP/UP kernels...

I guess in_atomic() should be renamed to
unreliable_in_atomic... because it does not really reliably tell you
if you are in atomic section or not.

Or we could negate the logic and call it maybe_kernel_context()?

gfp_any() also needs a better
name. pick_right_gfp_if_you_are_in_kernel_or_softirq_context() sounds
suitable :-).

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2009-02-05 16:17    [W:0.066 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site