[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160406161338.GA25498@ZenIV.linux.org.uk>
Date: Wed, 6 Apr 2016 17:13:38 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: fix dereference of ERR_PTR
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.
Powered by blists - more mailing lists