All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: fix dereference of ERR_PTR
Date: Wed, 6 Apr 2016 17:13:38 +0100	[thread overview]
Message-ID: <20160406161338.GA25498@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1459937265-4364-1-git-send-email-sudipm.mukherjee@gmail.com>

On Wed, Apr 06, 2016 at 11:07:45AM +0100, Sudip Mukherjee wrote:
> On the unlikely event of a bad name, d_hash_and_lookup() can return the
> error value in ERR_PTR(). And we were only checking the return value of
> d_hash_and_lookup() to be NULL. In case it is not NULL and has some
> error then d_inode() will try to dereference it later.

s/unlikely/impossible/ - procfs doesn't _have_ ->d_hash.  NAK; at most
add a
        /* no ->d_hash() rejects on procfs */
comment as we have next to another call site in procfs.

      reply	other threads:[~2016-04-06 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 10:07 [PATCH] proc: fix dereference of ERR_PTR Sudip Mukherjee
2016-04-06 16:13 ` Al Viro [this message]

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=20160406161338.GA25498@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.