OSDN Git Service

dcache: fix kmemcheck warning in switch_names
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 5 Sep 2014 16:16:01 +0000 (12:16 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Nov 2014 18:01:26 +0000 (13:01 -0500)
commit08d4f7722268755ee34ed1c9e8afee7dfff022bb
tree5bdff1bad7fb49dd18102dc2d42f9638d8a5dfc8
parent9f45f5bf302daad6835ce64701fb3c286a2cc6af
dcache: fix kmemcheck warning in switch_names

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>
Cc: stable@vger.kernel.org # v3.15
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c