aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorlinke li <[email protected]>2024-03-06 19:51:10 -0800
committerUladzislau Rezki (Sony) <[email protected]>2024-04-16 11:16:35 +0200
commita10e3cbf32786cae437e4f370573318721e47c2c (patch)
treed98a912ce5cbf70085ef6057c23c5308fdb0fba5 /lib/test_fortify/write_overflow-strncpy-src.c
parent8b9b443fa860276822b25057cb3ff3b28734dec0 (diff)
rcutorture: Re-use value stored to ->rtort_pipe_count instead of re-reading
Currently, the rcu_torture_pipe_update_one() writes the value (i + 1) to rp->rtort_pipe_count, then immediately re-reads it in order to compare it to RCU_TORTURE_PIPE_LEN. This re-read is pointless because no other update to rp->rtort_pipe_count can occur at this point. This commit therefore instead re-uses the (i + 1) value stored in the comparison instead of re-reading rp->rtort_pipe_count. Signed-off-by: linke li <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Linus Torvalds <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions