[lkml]   [2009]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PROBLEM: in_atomic() misuse all over the place
On Tue, Jan 27, 2009 at 06:12:00PM -0600, Robert Hancock wrote:
> I would think that the code that's using it for this purpose should be
> changed to do things differently, such as by changing the functions
> using it to make their caller pass in the proper GFP mask. I don't think
> it was ever intended to be used to select allocation behavior like this,
> only for debug warning checks and such.. Getting rid of in_atomic() and
> creating a in_atomic_warn() that just raises a warning if called
> atomically, might be the best long-term solution.

I also made the mistake of using in_atomic() wrong in one of my last
patch sets. In my case this was pointed out by the reviewers. Is there
some documentation in the kernel tree how and when in_atomic() is used
right? If not I think its worth writing a little file that explains the
important details about the correct use of in_atomic() :-)


 \ /
  Last update: 2009-01-31 12:47    [W:0.067 / U:55.688 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site