lkml.org 
[lkml]   [2009]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: introducing __GFP_PANIC
From
Date
On Mon, 2009-05-04 at 12:49 +0400, Cyrill Gorcunov wrote:
> | __GFP_PANIC is an annotation saying that it's okay for a particular
> | call-site not to check for NULL because we never expect to run out of
> | memory at that point. But we don't really need to panic() for all the
> | possible *errors*, just for the out-of-memory case.
> |
> | Pekka
> |
>
> Which means, __GFP_PANIC will not grant the guarantee to a caller
> that he will not get NULL deref even with __GFP_PANIC specified?

Yes, __GFP_PANIC will guarantee that you never return NULL for
_out-of-memory_ but makes no guarantees what happens if you pass bogus
size or order.



\
 
 \ /
  Last update: 2009-05-04 11:59    [W:0.108 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site