Merge commit 'v2.6.35' into perf/core
Conflicts: tools/perf/Makefile tools/perf/util/hist.c Merge reason: Resolve the conflicts and update to latest upstream. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -209,6 +209,31 @@ void exit_creds(struct task_struct *tsk)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get_task_cred - Get another task's objective credentials
|
||||
* @task: The task to query
|
||||
*
|
||||
* Get the objective credentials of a task, pinning them so that they can't go
|
||||
* away. Accessing a task's credentials directly is not permitted.
|
||||
*
|
||||
* The caller must also make sure task doesn't get deleted, either by holding a
|
||||
* ref on task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
*/
|
||||
const struct cred *get_task_cred(struct task_struct *task)
|
||||
{
|
||||
const struct cred *cred;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
do {
|
||||
cred = __task_cred((task));
|
||||
BUG_ON(!cred);
|
||||
} while (!atomic_inc_not_zero(&((struct cred *)cred)->usage));
|
||||
|
||||
rcu_read_unlock();
|
||||
return cred;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate blank credentials, such that the credentials can be filled in at a
|
||||
* later date without risk of ENOMEM.
|
||||
|
||||
@@ -605,13 +605,13 @@ cpu_master_loop:
|
||||
if (dbg_kdb_mode) {
|
||||
kgdb_connected = 1;
|
||||
error = kdb_stub(ks);
|
||||
kgdb_connected = 0;
|
||||
} else {
|
||||
error = gdb_serial_stub(ks);
|
||||
}
|
||||
|
||||
if (error == DBG_PASS_EVENT) {
|
||||
dbg_kdb_mode = !dbg_kdb_mode;
|
||||
kgdb_connected = 0;
|
||||
} else if (error == DBG_SWITCH_CPU_EVENT) {
|
||||
dbg_cpu_switch(cpu, dbg_switch_cpu);
|
||||
goto cpu_loop;
|
||||
|
||||
@@ -621,10 +621,8 @@ static void gdb_cmd_query(struct kgdb_state *ks)
|
||||
switch (remcom_in_buffer[1]) {
|
||||
case 's':
|
||||
case 'f':
|
||||
if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) {
|
||||
error_packet(remcom_out_buffer, -EINVAL);
|
||||
if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10))
|
||||
break;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
remcom_out_buffer[0] = 'm';
|
||||
@@ -665,10 +663,9 @@ static void gdb_cmd_query(struct kgdb_state *ks)
|
||||
pack_threadid(remcom_out_buffer + 2, thref);
|
||||
break;
|
||||
case 'T':
|
||||
if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) {
|
||||
error_packet(remcom_out_buffer, -EINVAL);
|
||||
if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16))
|
||||
break;
|
||||
}
|
||||
|
||||
ks->threadid = 0;
|
||||
ptr = remcom_in_buffer + 17;
|
||||
kgdb_hex2long(&ptr, &ks->threadid);
|
||||
|
||||
@@ -1820,9 +1820,8 @@ static int kdb_sr(int argc, const char **argv)
|
||||
{
|
||||
if (argc != 1)
|
||||
return KDB_ARGCOUNT;
|
||||
sysrq_toggle_support(1);
|
||||
kdb_trap_printk++;
|
||||
handle_sysrq(*argv[1], NULL);
|
||||
__handle_sysrq(*argv[1], NULL, 0);
|
||||
kdb_trap_printk--;
|
||||
|
||||
return 0;
|
||||
@@ -1883,6 +1882,7 @@ static int kdb_lsmod(int argc, const char **argv)
|
||||
kdb_printf(" (Loading)");
|
||||
else
|
||||
kdb_printf(" (Live)");
|
||||
kdb_printf(" 0x%p", mod->module_core);
|
||||
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
{
|
||||
@@ -2291,6 +2291,9 @@ static int kdb_ll(int argc, const char **argv)
|
||||
while (va) {
|
||||
char buf[80];
|
||||
|
||||
if (KDB_FLAG(CMD_INTERRUPT))
|
||||
return 0;
|
||||
|
||||
sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va);
|
||||
diag = kdb_parse(buf);
|
||||
if (diag)
|
||||
|
||||
+3
-1
@@ -787,7 +787,6 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
|
||||
|
||||
/* Store the name of the last unloaded module for diagnostic purposes */
|
||||
strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
|
||||
ddebug_remove_module(mod->name);
|
||||
|
||||
free_module(mod);
|
||||
return 0;
|
||||
@@ -1550,6 +1549,9 @@ static void free_module(struct module *mod)
|
||||
remove_sect_attrs(mod);
|
||||
mod_kobject_remove(mod);
|
||||
|
||||
/* Remove dynamic debug info */
|
||||
ddebug_remove_module(mod->name);
|
||||
|
||||
/* Arch-specific cleanup. */
|
||||
module_arch_cleanup(mod);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user