dcache: fix kmemcheck warning in switch_names
commitea1d1408bcb9ad16a3d43a931cc5df9d8418036f
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 5 Sep 2014 16:16:01 +0000 (5 12:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:45 +0000 (8 10:27 -0800)
tree6dbf87616caa27b9ec1e8a67f5f3d117684ec1f4
parentc69637cbf42badaaac12d0a9a8eb7bbf53e73633
dcache: fix kmemcheck warning in switch_names

commit 08d4f7722268755ee34ed1c9e8afee7dfff022bb upstream.

This patch fixes kmemcheck warning in switch_names. The function
switch_names swaps inline names of two dentries. It swaps full arrays
d_iname, no matter how many bytes are really used by the strings. Reading
data beyond string ends results in kmemcheck warning.

We fix the bug by marking both arrays as fully initialized.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/dcache.c