Merge branch 'master' into next
This commit is contained in:
@@ -92,19 +92,18 @@ extern int initcall_debug;
|
||||
static async_cookie_t __lowest_in_progress(struct list_head *running)
|
||||
{
|
||||
struct async_entry *entry;
|
||||
|
||||
if (!list_empty(running)) {
|
||||
entry = list_first_entry(running,
|
||||
struct async_entry, list);
|
||||
return entry->cookie;
|
||||
} else if (!list_empty(&async_pending)) {
|
||||
entry = list_first_entry(&async_pending,
|
||||
struct async_entry, list);
|
||||
return entry->cookie;
|
||||
} else {
|
||||
/* nothing in progress... next_cookie is "infinity" */
|
||||
return next_cookie;
|
||||
}
|
||||
|
||||
list_for_each_entry(entry, &async_pending, list)
|
||||
if (entry->running == running)
|
||||
return entry->cookie;
|
||||
|
||||
return next_cookie; /* "infinity" value */
|
||||
}
|
||||
|
||||
static async_cookie_t lowest_in_progress(struct list_head *running)
|
||||
|
||||
@@ -1409,7 +1409,7 @@ long do_fork(unsigned long clone_flags,
|
||||
}
|
||||
|
||||
audit_finish_fork(p);
|
||||
tracehook_report_clone(trace, regs, clone_flags, nr, p);
|
||||
tracehook_report_clone(regs, clone_flags, nr, p);
|
||||
|
||||
/*
|
||||
* We set PF_STARTING at creation in case tracing wants to
|
||||
|
||||
@@ -1451,7 +1451,6 @@ int kernel_kexec(void)
|
||||
error = device_suspend(PMSG_FREEZE);
|
||||
if (error)
|
||||
goto Resume_console;
|
||||
device_pm_lock();
|
||||
/* At this point, device_suspend() has been called,
|
||||
* but *not* device_power_down(). We *must*
|
||||
* device_power_down() now. Otherwise, drivers for
|
||||
@@ -1489,7 +1488,6 @@ int kernel_kexec(void)
|
||||
enable_nonboot_cpus();
|
||||
device_power_up(PMSG_RESTORE);
|
||||
Resume_devices:
|
||||
device_pm_unlock();
|
||||
device_resume(PMSG_RESTORE);
|
||||
Resume_console:
|
||||
resume_console();
|
||||
|
||||
@@ -370,8 +370,10 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
|
||||
sub_info->argv = argv;
|
||||
sub_info->envp = envp;
|
||||
sub_info->cred = prepare_usermodehelper_creds();
|
||||
if (!sub_info->cred)
|
||||
if (!sub_info->cred) {
|
||||
kfree(sub_info);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
out:
|
||||
return sub_info;
|
||||
|
||||
@@ -215,8 +215,6 @@ static int create_image(int platform_mode)
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
device_pm_lock();
|
||||
|
||||
/* At this point, device_suspend() has been called, but *not*
|
||||
* device_power_down(). We *must* call device_power_down() now.
|
||||
* Otherwise, drivers for some devices (e.g. interrupt controllers)
|
||||
@@ -227,7 +225,7 @@ static int create_image(int platform_mode)
|
||||
if (error) {
|
||||
printk(KERN_ERR "PM: Some devices failed to power down, "
|
||||
"aborting hibernation\n");
|
||||
goto Unlock;
|
||||
return error;
|
||||
}
|
||||
|
||||
error = platform_pre_snapshot(platform_mode);
|
||||
@@ -280,9 +278,6 @@ static int create_image(int platform_mode)
|
||||
device_power_up(in_suspend ?
|
||||
(error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
|
||||
|
||||
Unlock:
|
||||
device_pm_unlock();
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -344,13 +339,11 @@ static int resume_target_kernel(bool platform_mode)
|
||||
{
|
||||
int error;
|
||||
|
||||
device_pm_lock();
|
||||
|
||||
error = device_power_down(PMSG_QUIESCE);
|
||||
if (error) {
|
||||
printk(KERN_ERR "PM: Some devices failed to power down, "
|
||||
"aborting resume\n");
|
||||
goto Unlock;
|
||||
return error;
|
||||
}
|
||||
|
||||
error = platform_pre_restore(platform_mode);
|
||||
@@ -403,9 +396,6 @@ static int resume_target_kernel(bool platform_mode)
|
||||
|
||||
device_power_up(PMSG_RECOVER);
|
||||
|
||||
Unlock:
|
||||
device_pm_unlock();
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -464,11 +454,9 @@ int hibernation_platform_enter(void)
|
||||
goto Resume_devices;
|
||||
}
|
||||
|
||||
device_pm_lock();
|
||||
|
||||
error = device_power_down(PMSG_HIBERNATE);
|
||||
if (error)
|
||||
goto Unlock;
|
||||
goto Resume_devices;
|
||||
|
||||
error = hibernation_ops->prepare();
|
||||
if (error)
|
||||
@@ -493,9 +481,6 @@ int hibernation_platform_enter(void)
|
||||
|
||||
device_power_up(PMSG_RESTORE);
|
||||
|
||||
Unlock:
|
||||
device_pm_unlock();
|
||||
|
||||
Resume_devices:
|
||||
entering_platform_hibernation = false;
|
||||
device_resume(PMSG_RESTORE);
|
||||
|
||||
@@ -289,12 +289,10 @@ static int suspend_enter(suspend_state_t state)
|
||||
{
|
||||
int error;
|
||||
|
||||
device_pm_lock();
|
||||
|
||||
if (suspend_ops->prepare) {
|
||||
error = suspend_ops->prepare();
|
||||
if (error)
|
||||
goto Done;
|
||||
return error;
|
||||
}
|
||||
|
||||
error = device_power_down(PMSG_SUSPEND);
|
||||
@@ -343,9 +341,6 @@ static int suspend_enter(suspend_state_t state)
|
||||
if (suspend_ops->finish)
|
||||
suspend_ops->finish();
|
||||
|
||||
Done:
|
||||
device_pm_unlock();
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -305,6 +305,8 @@ int ptrace_detach(struct task_struct *child, unsigned int data)
|
||||
if (child->ptrace) {
|
||||
child->exit_code = data;
|
||||
dead = __ptrace_detach(current, child);
|
||||
if (!child->exit_state)
|
||||
wake_up_process(child);
|
||||
}
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user