This is a note to let you know that I've just added the patch titled
dcache: fix kmemcheck warning in switch_names
to the 3.17-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dcache-fix-kmemcheck-warning-in-switch_names.patch
and it can be found in the queue-3.17 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 08d4f7722268755ee34ed1c9e8afee7dfff022bb Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <[email protected]>
Date: Fri, 5 Sep 2014 12:16:01 -0400
Subject: dcache: fix kmemcheck warning in switch_names
From: Mikulas Patocka <[email protected]>
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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/dcache.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2407,6 +2407,8 @@ static void switch_names(struct dentry *
*/
unsigned int i;
BUILD_BUG_ON(!IS_ALIGNED(DNAME_INLINE_LEN,
sizeof(long)));
+ kmemcheck_mark_initialized(dentry->d_iname,
DNAME_INLINE_LEN);
+ kmemcheck_mark_initialized(target->d_iname,
DNAME_INLINE_LEN);
if (!exchange) {
memcpy(dentry->d_iname, target->d_name.name,
target->d_name.len + 1);
Patches currently in stable-queue which might be from [email protected] are
queue-3.17/dm-thin-fix-a-race-in-thin_dtr.patch
queue-3.17/dm-bufio-fix-memleak-when-using-a-dm_buffer-s-inline-bio.patch
queue-3.17/dcache-fix-kmemcheck-warning-in-switch_names.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html