]> git.itanic.dy.fi Git - linux-stable/commit
kernfs: fix off by one error.
authorRichard Cochran <richardcochran@gmail.com>
Wed, 5 Mar 2014 16:10:52 +0000 (17:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 00:19:03 +0000 (17:19 -0700)
commit52d6c48c9db5b020e6595067a7f1b00562d26434
tree89a06323f2b7ac34519da1917bab0212219ebdbb
parent541d5f25b500f84ed324df3e2b06f2235cefae52
kernfs: fix off by one error.

commit 88391d49abb7d8dee91d405f96bd9e003cb6798d upstream.

The hash values 0 and 1 are reserved for magic directory entries, but
the code only prevents names hashing to 0. This patch fixes the test
to also prevent hash value 1.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/dir.c