From: Steven Rostedt Date: Fri, 8 May 2009 15:03:57 +0000 (-0400) Subject: ring-buffer: check for divide by zero in ring-buffer-benchmark X-Git-Tag: v2.6.31-rc1~401^2~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d988ff94c1074c4c914235c8591bcceafb585ecf;p=pandora-kernel.git 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 Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed