aboutsummaryrefslogtreecommitdiff
path: root/kernel/configs.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-05-08 11:03:57 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-05-11 13:22:26 -0400
commitd988ff94c1074c4c914235c8591bcceafb585ecf (patch)
tree46dc84aa84e04ae92cd66ed5cbf7a55452dcdb1c /kernel/configs.c
parent5a772b2b3c68e7e0b503c5a48469113bb0634314 (diff)
ring-buffer: check for divide by zero in ring-buffer-benchmark
Although we check if "missed" is not zero, we divide by hit + missed, and the addition can possible overflow and become a divide by zero. This patch checks for this case, and will report it when it happens then modify "hit" to make the calculation be non zero. [ Impact: prevent possible divide by zero in ring-buffer-benchmark ] Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/configs.c')
0 files changed, 0 insertions, 0 deletions