diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-27 14:01:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-27 14:01:21 -0400 |
commit | 7b87308e710858e95729b9e33c8b79e2a1564d37 (patch) | |
tree | c0d9510ac19c1d2931ae784e63981da98773a817 | |
parent | 64ebe3126cefa45d7b97a6fc4de846285a55321f (diff) | |
parent | be71eda5383faa663efdba9ef54a6b8255e3c7f0 (diff) |
Merge tag 'modules-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
Pull modules fix from Jessica Yu:
"Fix display of module section addresses in sysfs, which were getting
hashed with %pK and breaking tools like perf"
* tag 'modules-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
module: Fix display of wrong module .text address
-rw-r--r-- | kernel/module.c | 3 |
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 | ||
1478 | static void free_sect_attrs(struct module_sect_attrs *sect_attrs) | 1479 | static void free_sect_attrs(struct module_sect_attrs *sect_attrs) |