Skip to content

Commit

Permalink
Merge branch 'akpm' (incoming from Andrew)
Browse files Browse the repository at this point in the history
Merge third batch of fixes from Andrew Morton:
 "Most of the rest.  I still have two large patchsets against AIO and
  IPC, but they're a bit stuck behind other trees and I'm about to
  vanish for six days.

   - random fixlets
   - inotify
   - more of the MM queue
   - show_stack() cleanups
   - DMI update
   - kthread/workqueue things
   - compat cleanups
   - epoll udpates
   - binfmt updates
   - nilfs2
   - hfs
   - hfsplus
   - ptrace
   - kmod
   - coredump
   - kexec
   - rbtree
   - pids
   - pidns
   - pps
   - semaphore tweaks
   - some w1 patches
   - relay updates
   - core Kconfig changes
   - sysrq tweaks"

* emailed patches from Andrew Morton <[email protected]>: (109 commits)
  Documentation/sysrq: fix inconstistent help message of sysrq key
  ethernet/emac/sysrq: fix inconstistent help message of sysrq key
  sparc/sysrq: fix inconstistent help message of sysrq key
  powerpc/xmon/sysrq: fix inconstistent help message of sysrq key
  ARM/etm/sysrq: fix inconstistent help message of sysrq key
  power/sysrq: fix inconstistent help message of sysrq key
  kgdb/sysrq: fix inconstistent help message of sysrq key
  lib/decompress.c: fix initconst
  notifier-error-inject: fix module names in Kconfig
  kernel/sys.c: make prctl(PR_SET_MM) generally available
  UAPI: remove empty Kbuild files
  menuconfig: print more info for symbol without prompts
  init/Kconfig: re-order CONFIG_EXPERT options to fix menuconfig display
  kconfig menu: move Virtualization drivers near other virtualization options
  Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
  relay: use macro PAGE_ALIGN instead of FIX_SIZE
  kernel/relay.c: move FIX_SIZE macro into relay.c
  kernel/relay.c: remove unused function argument actor
  drivers/w1/slaves/w1_ds2760.c: fix the error handling in w1_ds2760_add_slave()
  drivers/w1/slaves/w1_ds2781.c: fix the error handling in w1_ds2781_add_slave()
  ...
  • Loading branch information
torvalds committed May 1, 2013
2 parents f1e9a23 + e2a8b0a commit 5f56886
Show file tree
Hide file tree
Showing 214 changed files with 2,820 additions and 1,690 deletions.
20 changes: 10 additions & 10 deletions Documentation/sysrq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ On all - write a character to /proc/sysrq-trigger. e.g.:

* Okay, so what can I use them for?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well, un'R'aw is very handy when your X server or a svgalib program crashes.
Well, unraw(r) is very handy when your X server or a svgalib program crashes.

sa'K' (Secure Access Key) is useful when you want to be sure there is no
sak(k) (Secure Access Key) is useful when you want to be sure there is no
trojan program running at console which could grab your password
when you would try to login. It will kill all programs on given console,
thus letting you make sure that the login prompt you see is actually
Expand All @@ -143,20 +143,20 @@ IMPORTANT: such. :IMPORTANT
useful when you want to exit a program that will not let you switch consoles.
(For example, X or a svgalib program.)

re'B'oot is good when you're unable to shut down. But you should also 'S'ync
and 'U'mount first.
reboot(b) is good when you're unable to shut down. But you should also
sync(s) and umount(u) first.

'C'rash can be used to manually trigger a crashdump when the system is hung.
crash(c) can be used to manually trigger a crashdump when the system is hung.
Note that this just triggers a crash if there is no dump mechanism available.

'S'ync is great when your system is locked up, it allows you to sync your
sync(s) is great when your system is locked up, it allows you to sync your
disks and will certainly lessen the chance of data loss and fscking. Note
that the sync hasn't taken place until you see the "OK" and "Done" appear
on the screen. (If the kernel is really in strife, you may not ever get the
OK or Done message...)

'U'mount is basically useful in the same ways as 'S'ync. I generally 'S'ync,
'U'mount, then re'B'oot when my system locks. It's saved me many a fsck.
umount(u) is basically useful in the same ways as sync(s). I generally sync(s),
umount(u), then reboot(b) when my system locks. It's saved me many a fsck.
Again, the unmount (remount read-only) hasn't taken place until you see the
"OK" and "Done" message appear on the screen.

Expand All @@ -165,11 +165,11 @@ kernel messages you do not want to see. Selecting '0' will prevent all but
the most urgent kernel messages from reaching your console. (They will
still be logged if syslogd/klogd are alive, though.)

t'E'rm and k'I'll are useful if you have some sort of runaway process you
term(e) and kill(i) are useful if you have some sort of runaway process you
are unable to kill any other way, especially if it's spawning other
processes.

"'J'ust thaw it" is useful if your system becomes unresponsive due to a frozen
"just thaw it(j)" is useful if your system becomes unresponsive due to a frozen
(probably root) filesystem via the FIFREEZE ioctl.

* Sometimes SysRq seems to get 'stuck' after using it, what can I do?
Expand Down
1 change: 1 addition & 0 deletions arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ machine_power_off(void)
void
show_regs(struct pt_regs *regs)
{
show_regs_print_info(KERN_DEFAULT);
dik_show_regs(regs, NULL);
}

Expand Down
7 changes: 0 additions & 7 deletions arch/alpha/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ void show_stack(struct task_struct *task, unsigned long *sp)
dik_show_trace(sp);
}

void dump_stack(void)
{
show_stack(NULL, NULL);
}

EXPORT_SYMBOL(dump_stack);

void
die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
{
Expand Down
7 changes: 0 additions & 7 deletions arch/arc/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,6 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
show_stacktrace(tsk, NULL);
}

/* Expected by Rest of kernel code */
void dump_stack(void)
{
show_stacktrace(NULL, NULL);
}
EXPORT_SYMBOL(dump_stack);

/* Another API expected by schedular, shows up in "ps" as Wait Channel
* Ofcourse just returning schedule( ) would be pointless so unwind until
* the function is not in schedular code
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/kernel/troubleshoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void print_task_path_n_nm(struct task_struct *tsk, char *buf)
}

done:
pr_info("%s, TGID %u\n", path_nm, tsk->tgid);
pr_info("Path: %s\n", path_nm);
}
EXPORT_SYMBOL(print_task_path_n_nm);

Expand Down Expand Up @@ -163,6 +163,7 @@ void show_regs(struct pt_regs *regs)
return;

print_task_path_n_nm(tsk, buf);
show_regs_print_info(KERN_INFO);

if (current->thread.cause_code)
show_ecr_verbose(regs);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static void sysrq_etm_dump(int key)

static struct sysrq_key_op sysrq_etm_op = {
.handler = sysrq_etm_dump,
.help_msg = "ETM buffer dump",
.help_msg = "etm-buffer-dump(v)",
.action_msg = "etm",
};

Expand Down
8 changes: 2 additions & 6 deletions arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,8 @@ void __show_regs(struct pt_regs *regs)
unsigned long flags;
char buf[64];

printk("CPU: %d %s (%s %.*s)\n",
raw_smp_processor_id(), print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
show_regs_print_info(KERN_DEFAULT);

print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
Expand Down Expand Up @@ -284,7 +281,6 @@ void __show_regs(struct pt_regs *regs)
void show_regs(struct pt_regs * regs)
{
printk("\n");
printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
__show_regs(regs);
dump_stack();
}
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,6 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
}
#endif

void dump_stack(void)
{
dump_backtrace(NULL, NULL);
}

EXPORT_SYMBOL(dump_stack);

void show_stack(struct task_struct *tsk, unsigned long *sp)
{
dump_backtrace(NULL, tsk);
Expand Down
7 changes: 1 addition & 6 deletions arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ void __show_regs(struct pt_regs *regs)
{
int i;

printk("CPU: %d %s (%s %.*s)\n",
raw_smp_processor_id(), print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
show_regs_print_info(KERN_DEFAULT);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->regs[30]);
printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
Expand All @@ -166,7 +162,6 @@ void __show_regs(struct pt_regs *regs)
void show_regs(struct pt_regs * regs)
{
printk("\n");
printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
__show_regs(regs);
}

Expand Down
7 changes: 0 additions & 7 deletions arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,6 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
}
}

void dump_stack(void)
{
dump_backtrace(NULL, NULL);
}

EXPORT_SYMBOL(dump_stack);

void show_stack(struct task_struct *tsk, unsigned long *sp)
{
dump_backtrace(NULL, tsk);
Expand Down
13 changes: 2 additions & 11 deletions arch/avr32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,6 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
show_stack_log_lvl(tsk, (unsigned long)stack, NULL, "");
}

void dump_stack(void)
{
unsigned long stack;

show_trace_log_lvl(current, &stack, NULL, "");
}
EXPORT_SYMBOL(dump_stack);

static const char *cpu_modes[] = {
"Application", "Supervisor", "Interrupt level 0", "Interrupt level 1",
"Interrupt level 2", "Interrupt level 3", "Exception", "NMI"
Expand All @@ -223,6 +215,8 @@ void show_regs_log_lvl(struct pt_regs *regs, const char *log_lvl)
unsigned long lr = regs->lr;
unsigned long mode = (regs->sr & MODE_MASK) >> MODE_SHIFT;

show_regs_print_info(log_lvl);

if (!user_mode(regs)) {
sp = (unsigned long)regs + FRAME_SIZE_FULL;

Expand Down Expand Up @@ -260,9 +254,6 @@ void show_regs_log_lvl(struct pt_regs *regs, const char *log_lvl)
regs->sr & SR_I0M ? '0' : '.',
regs->sr & SR_GM ? 'G' : 'g');
printk("%sCPU Mode: %s\n", log_lvl, cpu_modes[mode]);
printk("%sProcess: %s [%d] (task: %p thread: %p)\n",
log_lvl, current->comm, current->pid, current,
task_thread_info(current));
}

void show_regs(struct pt_regs *regs)
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/kernel/dumpstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ void dump_stack(void)
#endif
trace_buffer_save(tflags);
dump_bfin_trace_buffer();
dump_stack_print_info(KERN_DEFAULT);
show_stack(current, &stack);
trace_buffer_restore(tflags);
}
Expand Down
2 changes: 2 additions & 0 deletions arch/blackfin/kernel/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,8 @@ void show_regs(struct pt_regs *fp)
unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic();

pr_notice("\n");
show_regs_print_info(KERN_NOTICE);

if (CPUID != bfin_cpuid())
pr_notice("Compiled for cpu family 0x%04x (Rev %d), "
"but running on:0x%04x (Rev %d)\n",
Expand Down
10 changes: 1 addition & 9 deletions arch/c6x/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void __init trap_init(void)
void show_regs(struct pt_regs *regs)
{
pr_err("\n");
show_regs_print_info(KERN_ERR);
pr_err("PC: %08lx SP: %08lx\n", regs->pc, regs->sp);
pr_err("Status: %08lx ORIG_A4: %08lx\n", regs->csr, regs->orig_a4);
pr_err("A0: %08lx B0: %08lx\n", regs->a0, regs->b0);
Expand Down Expand Up @@ -67,15 +68,6 @@ void show_regs(struct pt_regs *regs)
pr_err("A31: %08lx B31: %08lx\n", regs->a31, regs->b31);
}

void dump_stack(void)
{
unsigned long stack;

show_stack(current, &stack);
}
EXPORT_SYMBOL(dump_stack);


void die(char *str, struct pt_regs *fp, int nr)
{
console_verbose();
Expand Down
3 changes: 3 additions & 0 deletions arch/cris/arch-v10/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ unsigned long get_wchan(struct task_struct *p)
void show_regs(struct pt_regs * regs)
{
unsigned long usp = rdusp();

show_regs_print_info(KERN_DEFAULT);

printk("IRP: %08lx SRP: %08lx DCCR: %08lx USP: %08lx MOF: %08lx\n",
regs->irp, regs->srp, regs->dccr, usp, regs->mof );
printk(" r0: %08lx r1: %08lx r2: %08lx r3: %08lx\n",
Expand Down
3 changes: 3 additions & 0 deletions arch/cris/arch-v32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ get_wchan(struct task_struct *p)
void show_regs(struct pt_regs * regs)
{
unsigned long usp = rdusp();

show_regs_print_info(KERN_DEFAULT);

printk("ERP: %08lx SRP: %08lx CCS: %08lx USP: %08lx MOF: %08lx\n",
regs->erp, regs->srp, regs->ccs, usp, regs->mof);

Expand Down
7 changes: 0 additions & 7 deletions arch/cris/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ show_stack(void)
}
#endif

void
dump_stack(void)
{
show_stack(NULL, NULL);
}
EXPORT_SYMBOL(dump_stack);

void
set_nmi_handler(void (*handler)(struct pt_regs *))
{
Expand Down
14 changes: 1 addition & 13 deletions arch/frv/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,17 +466,6 @@ asmlinkage void compound_exception(unsigned long esfr1,
BUG();
} /* end compound_exception() */

/*****************************************************************************/
/*
* The architecture-independent backtrace generator
*/
void dump_stack(void)
{
show_stack(NULL, NULL);
}

EXPORT_SYMBOL(dump_stack);

void show_stack(struct task_struct *task, unsigned long *sp)
{
}
Expand Down Expand Up @@ -508,6 +497,7 @@ void show_regs(struct pt_regs *regs)
int loop;

printk("\n");
show_regs_print_info(KERN_DEFAULT);

printk("Frame: @%08lx [%s]\n",
(unsigned long) regs,
Expand All @@ -522,8 +512,6 @@ void show_regs(struct pt_regs *regs)
else
printk(" | ");
}

printk("Process %s (pid: %d)\n", current->comm, current->pid);
}

void die_if_kernel(const char *str, ...)
Expand Down
2 changes: 2 additions & 0 deletions arch/h8300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ void machine_power_off(void)

void show_regs(struct pt_regs * regs)
{
show_regs_print_info(KERN_DEFAULT);

printk("\nPC: %08lx Status: %02x",
regs->pc, regs->ccr);
printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx",
Expand Down
7 changes: 0 additions & 7 deletions arch/h8300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,3 @@ void show_trace_task(struct task_struct *tsk)
{
show_stack(tsk,(unsigned long *)tsk->thread.esp0);
}

void dump_stack(void)
{
show_stack(NULL,NULL);
}

EXPORT_SYMBOL(dump_stack);
8 changes: 0 additions & 8 deletions arch/hexagon/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,6 @@ void show_stack(struct task_struct *task, unsigned long *fp)
do_show_stack(task, fp, 0);
}

void dump_stack(void)
{
unsigned long *fp;
asm("%0 = r30" : "=r" (fp));
show_stack(current, fp);
}
EXPORT_SYMBOL(dump_stack);

int die(const char *str, struct pt_regs *regs, long err)
{
static struct {
Expand Down
2 changes: 2 additions & 0 deletions arch/hexagon/kernel/vm_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/
void show_regs(struct pt_regs *regs)
{
show_regs_print_info(KERN_EMERG);

printk(KERN_EMERG "restart_r0: \t0x%08lx syscall_nr: %ld\n",
regs->restart_r0, regs->syscall_nr);
printk(KERN_EMERG "preds: \t\t0x%08lx\n", regs->preds);
Expand Down
12 changes: 2 additions & 10 deletions arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,14 @@ show_stack (struct task_struct *task, unsigned long *sp)
}
}

void
dump_stack (void)
{
show_stack(NULL, NULL);
}

EXPORT_SYMBOL(dump_stack);

void
show_regs (struct pt_regs *regs)
{
unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;

print_modules();
printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
smp_processor_id(), current->comm);
printk("\n");
show_regs_print_info(KERN_DEFAULT);
printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
init_utsname()->release);
Expand Down
Loading

0 comments on commit 5f56886

Please sign in to comment.