On Thu 18-07-24 19:22:37, Barry Song wrote: [...] > For future-proofing and security reasons, returning NULL for NOFAIL > still seems incorrect as the callers won't check the ret. If any future or > existing in-tree code has a potential bug which might be exploited by > hackers, for example > > ptr = kvmalloc_array(NOFAIL); > ptr->callback(); //ptr=NULL; > > callback could be a privilege escalation? Only if you allow to map zero page AFAIK. Nobody reasonable should be doing that. -- Michal Hocko SUSE Labs