mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 21:26:14 +01:00
Merge branch 'akpm' (incoming from Andrew)
Merge second patch-bomb from Andrew Morton: - various misc bits - the rest of MM - add generic fixmap.h, use it - backlight updates - dynamic_debug updates - printk() updates - checkpatch updates - binfmt_elf - ramfs - init/ - autofs4 - drivers/rtc - nilfs - hfsplus - Documentation/ - coredump - procfs - fork - exec - kexec - kdump - partitions - rapidio - rbtree - userns - memstick - w1 - decompressors * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (197 commits) lib/decompress_unlz4.c: always set an error return code on failures romfs: fix returm err while getting inode in fill_super drivers/w1/masters/w1-gpio.c: add strong pullup emulation drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug userns: relax the posix_acl_valid() checks arch/sh/kernel/dwarf.c: use rbtree postorder iteration helper instead of solution using repeated rb_erase() fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix fs/ext3: use rbtree postorder iteration helper instead of opencoding fs/jffs2: use rbtree postorder iteration helper instead of opencoding fs/ext4: use rbtree postorder iteration helper instead of opencoding fs/ubifs: use rbtree postorder iteration helper instead of opencoding net/netfilter/ipset/ip_set_hash_netiface.c: use rbtree postorder iteration instead of opencoding rbtree/test: test rbtree_postorder_for_each_entry_safe() rbtree/test: move rb_node to the middle of the test struct rapidio: add modular rapidio core build into powerpc and mips branches partitions/efi: complete documentation of gpt kernel param purpose kdump: add /sys/kernel/vmcoreinfo ABI documentation kdump: fix exported size of vmcoreinfo note kexec: add sysctl to disable kexec_load fs/exec.c: call arch_pick_mmap_layout() only once ...
This commit is contained in:
commit
3aacd625f2
231 changed files with 3339 additions and 2187 deletions
|
|
@ -800,14 +800,11 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
|
|||
* Allocate a new mm structure and copy contents from the
|
||||
* mm structure of the passed in task structure.
|
||||
*/
|
||||
struct mm_struct *dup_mm(struct task_struct *tsk)
|
||||
static struct mm_struct *dup_mm(struct task_struct *tsk)
|
||||
{
|
||||
struct mm_struct *mm, *oldmm = current->mm;
|
||||
int err;
|
||||
|
||||
if (!oldmm)
|
||||
return NULL;
|
||||
|
||||
mm = allocate_mm();
|
||||
if (!mm)
|
||||
goto fail_nomem;
|
||||
|
|
@ -1229,7 +1226,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
|||
if (!try_module_get(task_thread_info(p)->exec_domain->module))
|
||||
goto bad_fork_cleanup_count;
|
||||
|
||||
p->did_exec = 0;
|
||||
delayacct_tsk_init(p); /* Must remain after dup_task_struct() */
|
||||
copy_flags(clone_flags, p);
|
||||
INIT_LIST_HEAD(&p->children);
|
||||
|
|
@ -1654,7 +1650,7 @@ SYSCALL_DEFINE0(fork)
|
|||
return do_fork(SIGCHLD, 0, 0, NULL, NULL);
|
||||
#else
|
||||
/* can not support in nommu mode */
|
||||
return(-EINVAL);
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1662,7 +1658,7 @@ SYSCALL_DEFINE0(fork)
|
|||
#ifdef __ARCH_WANT_SYS_VFORK
|
||||
SYSCALL_DEFINE0(vfork)
|
||||
{
|
||||
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
|
||||
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
|
||||
0, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -932,6 +932,7 @@ static int kimage_load_segment(struct kimage *image,
|
|||
*/
|
||||
struct kimage *kexec_image;
|
||||
struct kimage *kexec_crash_image;
|
||||
int kexec_load_disabled;
|
||||
|
||||
static DEFINE_MUTEX(kexec_mutex);
|
||||
|
||||
|
|
@ -942,7 +943,7 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
|
|||
int result;
|
||||
|
||||
/* We only trust the superuser with rebooting the system. */
|
||||
if (!capable(CAP_SYS_BOOT))
|
||||
if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)
|
||||
return -EPERM;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ static ssize_t vmcoreinfo_show(struct kobject *kobj,
|
|||
{
|
||||
return sprintf(buf, "%lx %x\n",
|
||||
paddr_vmcoreinfo_note(),
|
||||
(unsigned int)vmcoreinfo_max_size);
|
||||
(unsigned int)sizeof(vmcoreinfo_note));
|
||||
}
|
||||
KERNEL_ATTR_RO(vmcoreinfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -1595,10 +1595,13 @@ asmlinkage int vprintk_emit(int facility, int level,
|
|||
* either merge it with the current buffer and flush, or if
|
||||
* there was a race with interrupts (prefix == true) then just
|
||||
* flush it out and store this line separately.
|
||||
* If the preceding printk was from a different task and missed
|
||||
* a newline, flush and append the newline.
|
||||
*/
|
||||
if (cont.len && cont.owner == current) {
|
||||
if (!(lflags & LOG_PREFIX))
|
||||
stored = cont_add(facility, level, text, text_len);
|
||||
if (cont.len) {
|
||||
if (cont.owner == current && !(lflags & LOG_PREFIX))
|
||||
stored = cont_add(facility, level, text,
|
||||
text_len);
|
||||
cont_flush(LOG_NEWLINE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1770,7 +1770,29 @@ void set_numabalancing_state(bool enabled)
|
|||
numabalancing_enabled = enabled;
|
||||
}
|
||||
#endif /* CONFIG_SCHED_DEBUG */
|
||||
#endif /* CONFIG_NUMA_BALANCING */
|
||||
|
||||
#ifdef CONFIG_PROC_SYSCTL
|
||||
int sysctl_numa_balancing(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
struct ctl_table t;
|
||||
int err;
|
||||
int state = numabalancing_enabled;
|
||||
|
||||
if (write && !capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
t = *table;
|
||||
t.data = &state;
|
||||
err = proc_dointvec_minmax(&t, write, buffer, lenp, ppos);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (write)
|
||||
set_numabalancing_state(state);
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* fork()/clone()-time setup:
|
||||
|
|
|
|||
|
|
@ -2047,8 +2047,8 @@ static bool do_signal_stop(int signr)
|
|||
if (task_set_jobctl_pending(current, signr | gstop))
|
||||
sig->group_stop_count++;
|
||||
|
||||
for (t = next_thread(current); t != current;
|
||||
t = next_thread(t)) {
|
||||
t = current;
|
||||
while_each_thread(current, t) {
|
||||
/*
|
||||
* Setting state to TASK_STOPPED for a group
|
||||
* stop is always done with the siglock held,
|
||||
|
|
@ -3125,8 +3125,7 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
|
|||
rm_from_queue_full(&mask, &t->signal->shared_pending);
|
||||
do {
|
||||
rm_from_queue_full(&mask, &t->pending);
|
||||
t = next_thread(t);
|
||||
} while (t != current);
|
||||
} while_each_thread(current, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -895,8 +895,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf)
|
|||
* only important on a multi-user system anyway, to make sure one user
|
||||
* can't send a signal to a process owned by another. -TYT, 12/12/91
|
||||
*
|
||||
* Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
|
||||
* LBT 04.03.94
|
||||
* !PF_FORKNOEXEC check to conform completely to POSIX.
|
||||
*/
|
||||
SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
|
||||
{
|
||||
|
|
@ -932,7 +931,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
|
|||
if (task_session(p) != task_session(group_leader))
|
||||
goto out;
|
||||
err = -EACCES;
|
||||
if (p->did_exec)
|
||||
if (!(p->flags & PF_FORKNOEXEC))
|
||||
goto out;
|
||||
} else {
|
||||
err = -ESRCH;
|
||||
|
|
@ -1572,8 +1571,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
|
|||
t = p;
|
||||
do {
|
||||
accumulate_thread_rusage(t, r);
|
||||
t = next_thread(t);
|
||||
} while (t != p);
|
||||
} while_each_thread(p, t);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include <linux/capability.h>
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/sched/sysctl.h>
|
||||
#include <linux/kexec.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/processor.h>
|
||||
|
|
@ -389,6 +390,15 @@ static struct ctl_table kern_table[] = {
|
|||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "numa_balancing",
|
||||
.data = NULL, /* filled in by handler */
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = sysctl_numa_balancing,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &one,
|
||||
},
|
||||
#endif /* CONFIG_NUMA_BALANCING */
|
||||
#endif /* CONFIG_SCHED_DEBUG */
|
||||
{
|
||||
|
|
@ -605,6 +615,18 @@ static struct ctl_table kern_table[] = {
|
|||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_KEXEC
|
||||
{
|
||||
.procname = "kexec_load_disabled",
|
||||
.data = &kexec_load_disabled,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
/* only handle a transition from default "0" to "1" */
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &one,
|
||||
.extra2 = &one,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_MODULES
|
||||
{
|
||||
.procname = "modprobe",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue