lkml.org 
[lkml]   [2006]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NFS: possible NULL pointer deref in nfs_sillyrename()
On 17/08/06, Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
> On Thu, 2006-08-17 at 00:22 +0200, Jesper Juhl wrote:
> > The coverity checker spotted this as bug #1013.
> >
> > If we get a NULL dentry->d_inode, then regardless of
> > NFS_PARANOIA or no NFS_PARANOIA, then if
> > if (dentry->d_flags & DCACHE_NFSFS_RENAMED)
> > turns out to be false we'll end up dereferencing
> > that NULL d_inode in two places below.
> >
> > And since the check for "(!dentry->d_inode)" even exists
> > (although inside #ifdef NFS_PARANOIA) I take that to mean
> > that this is a possibility.
>
> Sorry, but it isn't possible. See the checks in may_delete() (which is
> called before ->unlink()) and nfs_rename().
>
Thanks, that was useful info.

> IOW: Feel free to kill the NFS_PARANOIA crap. It looks like legacy code
> from a debugging session about a decade or so ago.
>
Sure thing, I'll cook up a patch to do that.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-17 12:09    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site