Re: [PATCH RFC] mm: warn potential return NULL for kmalloc_array and kvmalloc_array with __GFP_NOFAIL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 19, 2024 at 07:43:38PM +1200, Barry Song wrote:
> I doubt this is going to work as users can use a variant to save gfp_flags.
> On the other hand, isn't it necessarily a bug of vdpa, why can't it be mm?
> 
> if mm disallows GFP_NOFAIL,  there must be a doc to say that; if it allows,
> we should never return NULL.

Yeah.  Maybe the right answer is to have separate _nofail variants that
don't take any flags and make GFP_NOFAIL an entirely mm-private internal
flags that is rejected by all external interfaces.  That should also
really help with auditing the users.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux