Merge branch 'master' into next
Conflicts: security/smack/smack_lsm.c Verified and added fix by Stephen Rothwell <sfr@canb.auug.org.au> Ok'd by Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
@@ -42,12 +42,6 @@
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/*
|
||||
* for_each_console() allows you to iterate on each console
|
||||
*/
|
||||
#define for_each_console(con) \
|
||||
for (con = console_drivers; con != NULL; con = con->next)
|
||||
|
||||
/*
|
||||
* Architectures can override it:
|
||||
*/
|
||||
@@ -1080,21 +1074,23 @@ static DEFINE_PER_CPU(int, printk_pending);
|
||||
|
||||
void printk_tick(void)
|
||||
{
|
||||
if (__get_cpu_var(printk_pending)) {
|
||||
__get_cpu_var(printk_pending) = 0;
|
||||
if (__this_cpu_read(printk_pending)) {
|
||||
__this_cpu_write(printk_pending, 0);
|
||||
wake_up_interruptible(&log_wait);
|
||||
}
|
||||
}
|
||||
|
||||
int printk_needs_cpu(int cpu)
|
||||
{
|
||||
return per_cpu(printk_pending, cpu);
|
||||
if (cpu_is_offline(cpu))
|
||||
printk_tick();
|
||||
return __this_cpu_read(printk_pending);
|
||||
}
|
||||
|
||||
void wake_up_klogd(void)
|
||||
{
|
||||
if (waitqueue_active(&log_wait))
|
||||
__raw_get_cpu_var(printk_pending) = 1;
|
||||
this_cpu_write(printk_pending, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1363,6 +1359,7 @@ void register_console(struct console *newcon)
|
||||
spin_unlock_irqrestore(&logbuf_lock, flags);
|
||||
}
|
||||
release_console_sem();
|
||||
console_sysfs_notify();
|
||||
|
||||
/*
|
||||
* By unregistering the bootconsoles after we enable the real console
|
||||
@@ -1421,6 +1418,7 @@ int unregister_console(struct console *console)
|
||||
console_drivers->flags |= CON_CONSDEV;
|
||||
|
||||
release_console_sem();
|
||||
console_sysfs_notify();
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(unregister_console);
|
||||
|
Reference in New Issue
Block a user