From: Jan Kiszka Date: Mon, 23 May 2016 23:24:37 +0000 (-0700) Subject: scripts/gdb: Adjust module reference counter reported by lx-lsmod X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c22fde8b0e674a201f277688f1b3a38f6e09ada;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scripts/gdb: Adjust module reference counter reported by lx-lsmod This takes the MODULE_REF_BASE into account. Link: http://lkml.kernel.org/r/d926d2d54caa034adb964b52215090cbdb875249.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Jan Kiszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py index 0a35d6dbfb80..38f5d17044c5 100644 --- a/scripts/gdb/linux/modules.py +++ b/scripts/gdb/linux/modules.py @@ -78,7 +78,7 @@ class LxLsmod(gdb.Command): address=str(layout['base']).split()[0], name=module['name'].string(), size=str(layout['size']), - ref=str(module['refcnt']['counter']))) + ref=str(module['refcnt']['counter'] - 1))) source_list = module['source_list'] t = self._module_use_type.get_type().pointer()