diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 14:08:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 14:08:43 -0400 |
| commit | e579dde654fc2c6b0d3e4b77a9a4b2d2405c510e (patch) | |
| tree | fe507a2904fb302e964831a5ed079cb58ee44c37 | |
| parent | af82455f7dbd9dc20244d80d033721b30d22c065 (diff) | |
| parent | d66bb1607e2d8d384e53f3d93db5c18483c8c4f7 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull namespace updates from Eric Biederman:
"This is a set of small fixes that were mostly stumbled over during
more significant development. This proc fix and the fix to
posix-timers are the most significant of the lot.
There is a lot of good development going on but unfortunately it
didn't quite make the merge window"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
proc: Fix unbalanced hard link numbers
signal: Make kill_proc_info static
rlimit: Properly call security_task_setrlimit
signal: Remove unused definition of sig_user_definied
ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET
ipc: Remove unused declaration of recompute_msgmni
posix-timers: Correct sanity check in posix_cpu_nsleep
sysctl: Remove dead register_sysctl_root
| -rw-r--r-- | arch/ia64/kernel/asm-offsets.c | 4 | ||||
| -rw-r--r-- | fs/proc/generic.c | 1 | ||||
| -rw-r--r-- | fs/proc/proc_sysctl.c | 4 | ||||
| -rw-r--r-- | include/linux/sched/signal.h | 1 | ||||
| -rw-r--r-- | include/linux/signal.h | 4 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 1 | ||||
| -rw-r--r-- | ipc/util.h | 2 | ||||
| -rw-r--r-- | kernel/signal.c | 2 | ||||
| -rw-r--r-- | kernel/sys.c | 3 | ||||
| -rw-r--r-- | kernel/time/posix-cpu-timers.c | 2 | ||||
| -rw-r--r-- | net/sysctl_net.c | 1 |
11 files changed, 4 insertions, 21 deletions
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index 8786c8b4f187..798bdb209d00 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c | |||
| @@ -56,7 +56,6 @@ void foo(void) | |||
| 56 | DEFINE(IA64_TASK_PENDING_OFFSET,offsetof (struct task_struct, pending)); | 56 | DEFINE(IA64_TASK_PENDING_OFFSET,offsetof (struct task_struct, pending)); |
| 57 | DEFINE(IA64_TASK_PID_OFFSET, offsetof (struct task_struct, pid)); | 57 | DEFINE(IA64_TASK_PID_OFFSET, offsetof (struct task_struct, pid)); |
| 58 | DEFINE(IA64_TASK_REAL_PARENT_OFFSET, offsetof (struct task_struct, real_parent)); | 58 | DEFINE(IA64_TASK_REAL_PARENT_OFFSET, offsetof (struct task_struct, real_parent)); |
| 59 | DEFINE(IA64_TASK_SIGHAND_OFFSET,offsetof (struct task_struct, sighand)); | ||
| 60 | DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal)); | 59 | DEFINE(IA64_TASK_SIGNAL_OFFSET,offsetof (struct task_struct, signal)); |
| 61 | DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid)); | 60 | DEFINE(IA64_TASK_TGID_OFFSET, offsetof (struct task_struct, tgid)); |
| 62 | DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct task_struct, thread.ksp)); | 61 | DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct task_struct, thread.ksp)); |
| @@ -64,9 +63,6 @@ void foo(void) | |||
| 64 | 63 | ||
| 65 | BLANK(); | 64 | BLANK(); |
| 66 | 65 | ||
| 67 | DEFINE(IA64_SIGHAND_SIGLOCK_OFFSET,offsetof (struct sighand_struct, siglock)); | ||
| 68 | |||
| 69 | BLANK(); | ||
| 70 | 66 | ||
| 71 | DEFINE(IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,offsetof (struct signal_struct, | 67 | DEFINE(IA64_SIGNAL_GROUP_STOP_COUNT_OFFSET,offsetof (struct signal_struct, |
| 72 | group_stop_count)); | 68 | group_stop_count)); |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index ee27feb34cf4..9425c0d97262 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
| @@ -472,6 +472,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name) | |||
| 472 | ent->data = NULL; | 472 | ent->data = NULL; |
| 473 | ent->proc_fops = NULL; | 473 | ent->proc_fops = NULL; |
| 474 | ent->proc_iops = NULL; | 474 | ent->proc_iops = NULL; |
| 475 | parent->nlink++; | ||
| 475 | if (proc_register(parent, ent) < 0) { | 476 | if (proc_register(parent, ent) < 0) { |
| 476 | kfree(ent); | 477 | kfree(ent); |
| 477 | parent->nlink--; | 478 | parent->nlink--; |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index d04ea4349909..67985a7233c2 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
| @@ -408,10 +408,6 @@ static void next_entry(struct ctl_table_header **phead, struct ctl_table **pentr | |||
| 408 | *pentry = entry; | 408 | *pentry = entry; |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | void register_sysctl_root(struct ctl_table_root *root) | ||
| 412 | { | ||
| 413 | } | ||
| 414 | |||
| 415 | /* | 411 | /* |
| 416 | * sysctl_perm does NOT grant the superuser all rights automatically, because | 412 | * sysctl_perm does NOT grant the superuser all rights automatically, because |
| 417 | * some sysctl variables are readonly even to root. | 413 | * some sysctl variables are readonly even to root. |
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 2cf446704cd4..c06d63b3a583 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h | |||
| @@ -293,7 +293,6 @@ extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, | |||
| 293 | const struct cred *, u32); | 293 | const struct cred *, u32); |
| 294 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 294 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
| 295 | extern int kill_pid(struct pid *pid, int sig, int priv); | 295 | extern int kill_pid(struct pid *pid, int sig, int priv); |
| 296 | extern int kill_proc_info(int, struct siginfo *, pid_t); | ||
| 297 | extern __must_check bool do_notify_parent(struct task_struct *, int); | 296 | extern __must_check bool do_notify_parent(struct task_struct *, int); |
| 298 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | 297 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); |
| 299 | extern void force_sig(int, struct task_struct *); | 298 | extern void force_sig(int, struct task_struct *); |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 94ad6eea9550..1f5a16620693 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -390,10 +390,6 @@ int unhandled_signal(struct task_struct *tsk, int sig); | |||
| 390 | #define sig_kernel_ignore(sig) siginmask(sig, SIG_KERNEL_IGNORE_MASK) | 390 | #define sig_kernel_ignore(sig) siginmask(sig, SIG_KERNEL_IGNORE_MASK) |
| 391 | #define sig_kernel_stop(sig) siginmask(sig, SIG_KERNEL_STOP_MASK) | 391 | #define sig_kernel_stop(sig) siginmask(sig, SIG_KERNEL_STOP_MASK) |
| 392 | 392 | ||
| 393 | #define sig_user_defined(t, signr) \ | ||
| 394 | (((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_DFL) && \ | ||
| 395 | ((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_IGN)) | ||
| 396 | |||
| 397 | #define sig_fatal(t, signr) \ | 393 | #define sig_fatal(t, signr) \ |
| 398 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ | 394 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ |
| 399 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) | 395 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index b7e82049fec7..80d07816def0 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -180,7 +180,6 @@ extern void setup_sysctl_set(struct ctl_table_set *p, | |||
| 180 | int (*is_seen)(struct ctl_table_set *)); | 180 | int (*is_seen)(struct ctl_table_set *)); |
| 181 | extern void retire_sysctl_set(struct ctl_table_set *set); | 181 | extern void retire_sysctl_set(struct ctl_table_set *set); |
| 182 | 182 | ||
| 183 | void register_sysctl_root(struct ctl_table_root *root); | ||
| 184 | struct ctl_table_header *__register_sysctl_table( | 183 | struct ctl_table_header *__register_sysctl_table( |
| 185 | struct ctl_table_set *set, | 184 | struct ctl_table_set *set, |
| 186 | const char *path, struct ctl_table *table); | 185 | const char *path, struct ctl_table *table); |
diff --git a/ipc/util.h b/ipc/util.h index 51f7ca58ac67..60ddccca464d 100644 --- a/ipc/util.h +++ b/ipc/util.h | |||
| @@ -153,8 +153,6 @@ extern struct msg_msg *load_msg(const void __user *src, size_t len); | |||
| 153 | extern struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst); | 153 | extern struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst); |
| 154 | extern int store_msg(void __user *dest, struct msg_msg *msg, size_t len); | 154 | extern int store_msg(void __user *dest, struct msg_msg *msg, size_t len); |
| 155 | 155 | ||
| 156 | extern void recompute_msgmni(struct ipc_namespace *); | ||
| 157 | |||
| 158 | static inline int ipc_buildid(int id, int seq) | 156 | static inline int ipc_buildid(int id, int seq) |
| 159 | { | 157 | { |
| 160 | return SEQ_MULTIPLIER * seq + id; | 158 | return SEQ_MULTIPLIER * seq + id; |
diff --git a/kernel/signal.c b/kernel/signal.c index 7e59ebc2c25e..a8c54f384553 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -1318,7 +1318,7 @@ int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) | |||
| 1318 | } | 1318 | } |
| 1319 | } | 1319 | } |
| 1320 | 1320 | ||
| 1321 | int kill_proc_info(int sig, struct siginfo *info, pid_t pid) | 1321 | static int kill_proc_info(int sig, struct siginfo *info, pid_t pid) |
| 1322 | { | 1322 | { |
| 1323 | int error; | 1323 | int error; |
| 1324 | rcu_read_lock(); | 1324 | rcu_read_lock(); |
diff --git a/kernel/sys.c b/kernel/sys.c index 196c7134bee6..8a94b4eabcaa 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -1396,8 +1396,7 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource, | |||
| 1396 | !capable(CAP_SYS_RESOURCE)) | 1396 | !capable(CAP_SYS_RESOURCE)) |
| 1397 | retval = -EPERM; | 1397 | retval = -EPERM; |
| 1398 | if (!retval) | 1398 | if (!retval) |
| 1399 | retval = security_task_setrlimit(tsk->group_leader, | 1399 | retval = security_task_setrlimit(tsk, resource, new_rlim); |
| 1400 | resource, new_rlim); | ||
| 1401 | if (resource == RLIMIT_CPU && new_rlim->rlim_cur == 0) { | 1400 | if (resource == RLIMIT_CPU && new_rlim->rlim_cur == 0) { |
| 1402 | /* | 1401 | /* |
| 1403 | * The caller is asking for an immediate RLIMIT_CPU | 1402 | * The caller is asking for an immediate RLIMIT_CPU |
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index 949e434d3536..1370f067fb51 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c | |||
| @@ -1318,7 +1318,7 @@ static int posix_cpu_nsleep(const clockid_t which_clock, int flags, | |||
| 1318 | */ | 1318 | */ |
| 1319 | if (CPUCLOCK_PERTHREAD(which_clock) && | 1319 | if (CPUCLOCK_PERTHREAD(which_clock) && |
| 1320 | (CPUCLOCK_PID(which_clock) == 0 || | 1320 | (CPUCLOCK_PID(which_clock) == 0 || |
| 1321 | CPUCLOCK_PID(which_clock) == current->pid)) | 1321 | CPUCLOCK_PID(which_clock) == task_pid_vnr(current))) |
| 1322 | return -EINVAL; | 1322 | return -EINVAL; |
| 1323 | 1323 | ||
| 1324 | error = do_cpu_nanosleep(which_clock, flags, rqtp, &it); | 1324 | error = do_cpu_nanosleep(which_clock, flags, rqtp, &it); |
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 919981324171..9aed6fe1bf1a 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c | |||
| @@ -106,7 +106,6 @@ __init int net_sysctl_init(void) | |||
| 106 | ret = register_pernet_subsys(&sysctl_pernet_ops); | 106 | ret = register_pernet_subsys(&sysctl_pernet_ops); |
| 107 | if (ret) | 107 | if (ret) |
| 108 | goto out1; | 108 | goto out1; |
| 109 | register_sysctl_root(&net_sysctl_root); | ||
| 110 | out: | 109 | out: |
| 111 | return ret; | 110 | return ret; |
| 112 | out1: | 111 | out1: |
