Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-22 13:55:40 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-22 13:55:40 +0100
commitf75da847decfbd36f657496c1bba62db6f7ff983 (patch)
treea2d3daa015bc7094adf1f3f284027a231e637dbc
parentf557265a20d869fa57ed1fe290f5eccb80c46ead (diff)
parent536978eccf4aecadf28b0752f6d5605219f099b4 (diff)
Merge branch 'users/mbenes/SLE15/for-next' into SLE15
Pull tracing fix from Miroslav Benes suse-commit: aa68258786068eda4ccfdd775a89aaca6fc71a08
-rw-r--r--kernel/trace/trace_uprobe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 22f2a8f47b17..e302ab63ee31 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -159,6 +159,11 @@ static void FETCH_FUNC_NAME(memory, string)(struct pt_regs *regs,
((u8 *)get_rloc_data(dest))[0] = '\0';
*(u32 *)dest = make_data_rloc(0, get_rloc_offs(rloc));
} else {
+ /*
+ * Include the terminating null byte. It was copied by
+ * strncpy_from_user but not accounted for in ret.
+ */
+ ret++;
*(u32 *)dest = make_data_rloc(ret, get_rloc_offs(rloc));
}
}