mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
tracing/probes: Cleanup pointer arithmetic in store_trace_entry_data()
In store_trace_entry_data(), edata is cast to unsigned long for pointer offset arithmetic before being cast back to unsigned long *. Cast edata to u8 * instead. Link: https://lore.kernel.org/all/178454425622.296567.16952341966130280432.stgit@devnote2/ Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
parent
5428fca0cd
commit
78d252c935
|
|
@ -1246,7 +1246,7 @@ void store_trace_entry_data(void *edata, struct trace_probe *tp, struct pt_regs
|
|||
val = regs_get_kernel_argument(regs, code->param);
|
||||
break;
|
||||
case FETCH_OP_ST_EDATA:
|
||||
*(unsigned long *)((unsigned long)edata + code->offset) = val;
|
||||
*(unsigned long *)((u8 *)edata + code->offset) = val;
|
||||
break;
|
||||
case FETCH_OP_END:
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user