diff options
author | 2016-05-02 12:02:09 +0100 | |
---|---|---|
committer | 2016-05-02 12:02:09 +0100 | |
commit | 0ce8428ba9ea13098b828d0881e28368a108709c (patch) | |
tree | 12cbe5d9c27319b8a18ac9fc9cb44e3c5f35408c /kernel/resource.c | |
parent | ASoC: Intel: Atom: fix boot warning (diff) | |
parent | Merge remote-tracking branches 'asoc/fix/rt5640' and 'asoc/fix/wm8962' into asoc-linus (diff) | |
download | wireguard-linux-0ce8428ba9ea13098b828d0881e28368a108709c.tar.xz wireguard-linux-0ce8428ba9ea13098b828d0881e28368a108709c.zip |
Merge tag 'asoc-fix-v4.6-rc5' into asoc-intel
ASoC: Fixes for v4.6
This is a fairly large collection of fixes but almost all driver
specific ones, especially to the new Intel drivers which have had a lot
of recent development. The one core fix is a change to the debugfs code
to avoid crashes in some relatively unusual configurations.
Diffstat (limited to '')
-rw-r--r-- | kernel/resource.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 2e78ead30934..9b5f04404152 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -105,16 +105,25 @@ static int r_show(struct seq_file *m, void *v) { struct resource *root = m->private; struct resource *r = v, *p; + unsigned long long start, end; int width = root->end < 0x10000 ? 4 : 8; int depth; for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) if (p->parent == root) break; + + if (file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADMIN)) { + start = r->start; + end = r->end; + } else { + start = end = 0; + } + seq_printf(m, "%*s%0*llx-%0*llx : %s\n", depth * 2, "", - width, (unsigned long long) r->start, - width, (unsigned long long) r->end, + width, start, + width, end, r->name ? r->name : "<BAD>"); return 0; } |