aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index a6e43a5806a1..ce8066b88178 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1472,7 +1472,8 @@ static ssize_t module_sect_show(struct module_attribute *mattr,
1472{ 1472{
1473 struct module_sect_attr *sattr = 1473 struct module_sect_attr *sattr =
1474 container_of(mattr, struct module_sect_attr, mattr); 1474 container_of(mattr, struct module_sect_attr, mattr);
1475 return sprintf(buf, "0x%pK\n", (void *)sattr->address); 1475 return sprintf(buf, "0x%px\n", kptr_restrict < 2 ?
1476 (void *)sattr->address : NULL);
1476} 1477}
1477 1478
1478static void free_sect_attrs(struct module_sect_attrs *sect_attrs) 1479static void free_sect_attrs(struct module_sect_attrs *sect_attrs)