summaryrefslogtreecommitdiffstats
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
authorAndy Shevchenko2017-11-30 01:11:05 +0100
committerLinus Torvalds2017-11-30 03:40:43 +0100
commitedbddb83a15b4361d8c3bf00aabee85fd3ef4d80 (patch)
treeeff0436d3923cb327dbec8251657a411e19d0f43 /mm/kmemleak.c
parentfs/mbcache.c: make count_objects() more robust (diff)
downloadkernel-qcow2-linux-edbddb83a15b4361d8c3bf00aabee85fd3ef4d80.tar.gz
kernel-qcow2-linux-edbddb83a15b4361d8c3bf00aabee85fd3ef4d80.tar.xz
kernel-qcow2-linux-edbddb83a15b4361d8c3bf00aabee85fd3ef4d80.zip
scripts/bloat-o-meter: don't fail with division by 0
Under some circumstances it's possible to get a divider 0 which crashes the script. Traceback (most recent call last): File "linux/scripts/bloat-o-meter", line 98, in <module> print_result("Function", "tTdDbBrR", 2) File "linux/scripts/bloat-o-meter", line 87, in print_result (otot, ntot, (ntot - otot)*100.0/otot)) ZeroDivisionError: float division by zero Hide this by checking the divider first. Link: http://lkml.kernel.org/r/20171123171219.31453-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Vaneet Narang <v.narang@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/kmemleak.c')
0 files changed, 0 insertions, 0 deletions