linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Steven Whitehouse <swhiteho@redhat.com>
Cc: Robin Dong <robin.k.dong@gmail.com>,
	linux-fsdevel@vger.kernel.org, Robin Dong <sanbai@taobao.com>
Subject: Re: [PATCH] vfs: check value of varaiable 'nd' before using its member
Date: Wed, 4 Jul 2012 19:30:13 +0100	[thread overview]
Message-ID: <20120704183013.GI22927@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1341394749.2739.2.camel@menhir>

On Wed, Jul 04, 2012 at 10:39:09AM +0100, Steven Whitehouse wrote:
> Hi,
> 
> On Wed, 2012-07-04 at 17:32 +0800, Robin Dong wrote:
> > From: Robin Dong <sanbai@taobao.com>
> > 
> > When we using lookup_one_len() to search pathname component, it will call __lookup_hash()
> > with variable 'nd' as NULL :
> > 
> > 	--> __lookup_hash ( nd = NULL )
> > 		--> lookup_dcache
> > 			--> d_invalidate
> > 				--> proc_sys_revalidate
> > 
> > the proc_sys_revalidate will use 'nd->flags' before check whether its value is NULL.
> > This will cause kernel panic.
> > 
> > Therefore, we should adding check-code for filesystems which directly use nd->flags.
> > 
> > Signed-off-by: Robin Dong <sanbai@taobao.com>
> 
> nd will very shortly no longer be passed to revalidate... see this patch
> in Al's vfs git tree:
> 

Not to mention that anyone who tries to export procfs over nfs deserves Bad Things(tm)
happening to them....

IOW, what the hell is your code trying to do?

  reply	other threads:[~2012-07-04 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04  9:32 [PATCH] vfs: check value of varaiable 'nd' before using its member Robin Dong
2012-07-04  9:39 ` Steven Whitehouse
2012-07-04 18:30   ` Al Viro [this message]
2012-07-05  2:22     ` Dong Robin

Reply instructions:

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120704183013.GI22927@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=robin.k.dong@gmail.com \
    --cc=sanbai@taobao.com \
    --cc=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).