mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
tracing/probes: Fix to avoid double count of the string length on the array
[ Upstream commit66bcf65d6c
] If an array is specified with the ustring or symstr, the length of the strings are accumlated on both of 'ret' and 'total', which means the length is double counted. Just set the length to the 'ret' value for avoiding double counting. Link: https://lore.kernel.org/all/168908492917.123124.15076463491122036025.stgit@devnote2/ Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/8819b154-2ba1-43c3-98a2-cbde20892023@moroto.mountain/ Fixes:88903c4643
("tracing/probe: Add ustring type for user-space string") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7817985328
commit
0ffd6da8f8
1 changed files with 2 additions and 2 deletions
|
@ -136,11 +136,11 @@ stage3:
|
|||
code++;
|
||||
goto array;
|
||||
case FETCH_OP_ST_USTRING:
|
||||
ret += fetch_store_strlen_user(val + code->offset);
|
||||
ret = fetch_store_strlen_user(val + code->offset);
|
||||
code++;
|
||||
goto array;
|
||||
case FETCH_OP_ST_SYMSTR:
|
||||
ret += fetch_store_symstrlen(val + code->offset);
|
||||
ret = fetch_store_symstrlen(val + code->offset);
|
||||
code++;
|
||||
goto array;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue