diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-05 12:16:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-05 12:16:18 -0500 |
commit | a65981109f294ba7e64b33ad3b4575a4636fce66 (patch) | |
tree | 1061a49f11544e18775630938a8bc53920fa0421 /fs/proc | |
parent | 3fed6ae4b027f9c93be18520f87bd06bdffd196b (diff) | |
parent | b685a7350ae76bc0f388e24b36d06a63776c68ee (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
- procfs updates
- various misc bits
- lib/ updates
- epoll updates
- autofs
- fatfs
- a few more MM bits
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (58 commits)
mm/page_io.c: fix polled swap page in
checkpatch: add Co-developed-by to signature tags
docs: fix Co-Developed-by docs
drivers/base/platform.c: kmemleak ignore a known leak
fs: don't open code lru_to_page()
fs/: remove caller signal_pending branch predictions
mm/: remove caller signal_pending branch predictions
arch/arc/mm/fault.c: remove caller signal_pending_branch predictions
kernel/sched/: remove caller signal_pending branch predictions
kernel/locking/mutex.c: remove caller signal_pending branch predictions
mm: select HAVE_MOVE_PMD on x86 for faster mremap
mm: speed up mremap by 20x on large regions
mm: treewide: remove unused address argument from pte_alloc functions
initramfs: cleanup incomplete rootfs
scripts/gdb: fix lx-version string output
kernel/kcov.c: mark write_comp_data() as notrace
kernel/sysctl: add panic_print into sysctl
panic: add options to print system info when panic happens
bfs: extra sanity checking and static inode bitmap
exec: separate MM_ANONPAGES and RLIMIT_STACK accounting
...
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 18 | ||||
-rw-r--r-- | fs/proc/inode.c | 4 | ||||
-rw-r--r-- | fs/proc/util.c | 1 |
3 files changed, 15 insertions, 8 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index d7fd1ca807d2..633a63462573 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -581,8 +581,10 @@ static int proc_pid_limits(struct seq_file *m, struct pid_namespace *ns, | |||
581 | /* | 581 | /* |
582 | * print the file header | 582 | * print the file header |
583 | */ | 583 | */ |
584 | seq_printf(m, "%-25s %-20s %-20s %-10s\n", | 584 | seq_puts(m, "Limit " |
585 | "Limit", "Soft Limit", "Hard Limit", "Units"); | 585 | "Soft Limit " |
586 | "Hard Limit " | ||
587 | "Units \n"); | ||
586 | 588 | ||
587 | for (i = 0; i < RLIM_NLIMITS; i++) { | 589 | for (i = 0; i < RLIM_NLIMITS; i++) { |
588 | if (rlim[i].rlim_cur == RLIM_INFINITY) | 590 | if (rlim[i].rlim_cur == RLIM_INFINITY) |
@@ -2356,10 +2358,13 @@ static ssize_t timerslack_ns_write(struct file *file, const char __user *buf, | |||
2356 | return -ESRCH; | 2358 | return -ESRCH; |
2357 | 2359 | ||
2358 | if (p != current) { | 2360 | if (p != current) { |
2359 | if (!capable(CAP_SYS_NICE)) { | 2361 | rcu_read_lock(); |
2362 | if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { | ||
2363 | rcu_read_unlock(); | ||
2360 | count = -EPERM; | 2364 | count = -EPERM; |
2361 | goto out; | 2365 | goto out; |
2362 | } | 2366 | } |
2367 | rcu_read_unlock(); | ||
2363 | 2368 | ||
2364 | err = security_task_setscheduler(p); | 2369 | err = security_task_setscheduler(p); |
2365 | if (err) { | 2370 | if (err) { |
@@ -2392,11 +2397,14 @@ static int timerslack_ns_show(struct seq_file *m, void *v) | |||
2392 | return -ESRCH; | 2397 | return -ESRCH; |
2393 | 2398 | ||
2394 | if (p != current) { | 2399 | if (p != current) { |
2395 | 2400 | rcu_read_lock(); | |
2396 | if (!capable(CAP_SYS_NICE)) { | 2401 | if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { |
2402 | rcu_read_unlock(); | ||
2397 | err = -EPERM; | 2403 | err = -EPERM; |
2398 | goto out; | 2404 | goto out; |
2399 | } | 2405 | } |
2406 | rcu_read_unlock(); | ||
2407 | |||
2400 | err = security_task_getscheduler(p); | 2408 | err = security_task_getscheduler(p); |
2401 | if (err) | 2409 | if (err) |
2402 | goto out; | 2410 | goto out; |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 5792f9e39466..da649ccd6804 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -59,7 +59,6 @@ static struct kmem_cache *pde_opener_cache __ro_after_init; | |||
59 | static struct inode *proc_alloc_inode(struct super_block *sb) | 59 | static struct inode *proc_alloc_inode(struct super_block *sb) |
60 | { | 60 | { |
61 | struct proc_inode *ei; | 61 | struct proc_inode *ei; |
62 | struct inode *inode; | ||
63 | 62 | ||
64 | ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); | 63 | ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); |
65 | if (!ei) | 64 | if (!ei) |
@@ -71,8 +70,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb) | |||
71 | ei->sysctl = NULL; | 70 | ei->sysctl = NULL; |
72 | ei->sysctl_entry = NULL; | 71 | ei->sysctl_entry = NULL; |
73 | ei->ns_ops = NULL; | 72 | ei->ns_ops = NULL; |
74 | inode = &ei->vfs_inode; | 73 | return &ei->vfs_inode; |
75 | return inode; | ||
76 | } | 74 | } |
77 | 75 | ||
78 | static void proc_i_callback(struct rcu_head *head) | 76 | static void proc_i_callback(struct rcu_head *head) |
diff --git a/fs/proc/util.c b/fs/proc/util.c index b161cfa0f9fa..98f8adc17345 100644 --- a/fs/proc/util.c +++ b/fs/proc/util.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/dcache.h> | 1 | #include <linux/dcache.h> |
2 | #include "internal.h" | ||
2 | 3 | ||
3 | unsigned name_to_int(const struct qstr *qstr) | 4 | unsigned name_to_int(const struct qstr *qstr) |
4 | { | 5 | { |