From: Al Viro <viro@ZenIV.linux.org.uk>
To: Srikanth Korangala Hari <email@example.com>
Cc: Luis Chamberlain <firstname.lastname@example.org>,
Subject: Re: Re: [PATCH 1/1] Preventive patch in the proc file-system to handle NULL check.
Date: Fri, 17 Aug 2018 04:36:06 +0100 [thread overview]
Message-ID: <20180817033606.GB6515@ZenIV.linux.org.uk> (raw)
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.
next prev parent reply other threads:[~2018-08-17 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180816093424epcas2p25ede075fec715ad31108360ddca9cce8@epcas2p2.samsung.com>
2018-08-16 9:34 ` [PATCH 1/1] Preventive patch in the proc file-system to handle NULL check Srikanth K H
2018-08-16 12:32 ` Alexey Dobriyan
2018-08-16 13:17 ` Luis Chamberlain
[not found] ` <CGME20180816093424epcas2p25ede075fec715ad31108360ddca9cce8@epcms5p8>
2018-08-17 3:21 ` Srikanth Korangala Hari
2018-08-17 3:36 ` Al Viro [this message]
[not found] ` <CGME20180816093424epcas2p25ede075fec715ad31108360ddca9cce8@epcms5p1>
2018-08-17 3:27 ` Srikanth Korangala Hari
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).