[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140124122409.GT10323@ZenIV.linux.org.uk>
Date: Fri, 24 Jan 2014 12:24:09 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dcache: fix locking bug in __dentry_path()
On Fri, Jan 24, 2014 at 11:21:26AM +0100, Denys Vlasenko wrote:
> If given buffer size is zero, we forget to rcu_read_unlock()
> on error path.
Er... Where could we ever get called with size zero? IOW, the
real question is whether that check makes any sense. If nothing
else, a much more obvious fix (again, assuming there is a call
chain that could have triggered that in the first place), would
be to take that
if (buflen < 1)
goto Elong;
on the very top of __dentry_path(). Note that buflen never
change, so this check could bloody well be handled once - and
earlier. But again, the callers shouldn't be calling it that
way...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists