Messages in this thread | | | Date | Wed, 4 Feb 2009 17:17:52 +0100 | From | Pavel Machek <> | Subject | Re: 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
| |