logo       

Re: BUG or not? GFP_KERNEL with interrupts disabled.: msg#00242

Subject: Re: BUG or not? GFP_KERNEL with interrupts disabled.
   From: Linus Torvalds <torvalds@xxxxxxxxxxxxx>
   Date: Thu, 27 Mar 2003 11:08:26 -0800 (PST)

   So what the test SHOULD look like is this:
   
        if (gfp_mask & __GFP_WAIT) {
                if (in_atomic() || irqs_disabled()) {
                        static int count = 0;
                        ...
                }
        }
   
   which should catch all the cases we really care about.

Let's codify this "in_atomic() || irqs_disabled()" test into a macro
that everyone can use to test sleepability, ok?




<Prev in Thread] Current Thread [Next in Thread>