lkml.org 
[lkml]   [2018]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH 1/1] Preventive patch in the proc file-system to handle NULL check.
On Fri, Aug 17, 2018 at 08:51:42AM +0530, Srikanth Korangala Hari wrote:
> > Thanks for the patch! Do you have a reproducer or is this theoretical?
> > This will affect if it should go to stable or not.
>
> Dear Luis, this is theoretical as I observed in most of the call's to api - "proc_mkdir" the NULL check is being done. Hence I thought of adding one here.

Realistically, if you get allocation failures that early in the boot,
oops is the least of your problems - it won't get through mounting
the root or lauching init (or unpacking initramfs, etc.)

Sure, might as well check it there - nothing wrong with that, but do
keep in mind that
* it's very certain to end up in panic() very shortly afterwards,
no matter what
* the odds of exhausting memory (and that would be extremely
low-memory setup) precisely at that point (i.e. even getting to
proc_root_init()) are not high.

Might be interesting to try lower and lower mem=... values passed to the
kernel in attempt to step into this one; I wouldn't put large odds on
being able to hit precisely that place, but it would be educational anyway.

\
 
 \ /
  Last update: 2018-08-17 05:37    [W:0.148 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site