diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
| commit | 720d690e3680d8ae5fcf86f8614c1a10b4ee7605 (patch) | |
| tree | 02158973d51022d7374f5b6e2f1953b530127f43 /kernel/module.c | |
| parent | 72b6500c1cc68b949faa1bac76359dc601b482d6 (diff) | |
| parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
Merge 4.17-rc3 into char-misc-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/module.c')
| -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, { struct module_sect_attr *sattr = container_of(mattr, struct module_sect_attr, mattr); - return sprintf(buf, "0x%pK\n", (void *)sattr->address); + return sprintf(buf, "0x%px\n", kptr_restrict < 2 ? + (void *)sattr->address : NULL); } static void free_sect_attrs(struct module_sect_attrs *sect_attrs) |
