aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Passos <[email protected]>2024-06-14 23:24:10 -0300
committerAlexei Starovoitov <[email protected]>2024-06-20 19:50:26 -0700
commit21ab4980e02d495174bc64c00ceb4d3cf87fadb1 (patch)
tree008909b701e35b7a7c65c468684f2e7ca18235fe
parentab224b9ef7c4eaa752752455ea79bd7022209d5d (diff)
bpf: remove redeclaration of new_n in bpf_verifier_vlog
This new_n is defined in the start of this function. Its value is overwritten by `new_n = min(n, log->len_total);` a couple lines before my change, rendering the shadow declaration unnecessary. Signed-off-by: Rafael Passos <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
-rw-r--r--kernel/bpf/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/log.c b/kernel/bpf/log.c
index 3f4ae92e549f..5aebfc3051e3 100644
--- a/kernel/bpf/log.c
+++ b/kernel/bpf/log.c
@@ -91,7 +91,7 @@ void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt,
goto fail;
} else {
u64 new_end, new_start;
- u32 buf_start, buf_end, new_n;
+ u32 buf_start, buf_end;
new_end = log->end_pos + n;
if (new_end - log->start_pos >= log->len_total)