diff options
Diffstat (limited to 'arch/um/drivers/mconsole_kern.c')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 28e3760e8b98..6d7173fc55a3 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -62,7 +62,7 @@ static void mc_work_proc(void *unused) | |||
62 | unsigned long flags; | 62 | unsigned long flags; |
63 | 63 | ||
64 | while(!list_empty(&mc_requests)){ | 64 | while(!list_empty(&mc_requests)){ |
65 | local_save_flags(flags); | 65 | local_irq_save(flags); |
66 | req = list_entry(mc_requests.next, struct mconsole_entry, | 66 | req = list_entry(mc_requests.next, struct mconsole_entry, |
67 | list); | 67 | list); |
68 | list_del(&req->list); | 68 | list_del(&req->list); |
@@ -87,7 +87,7 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id, | |||
87 | if(req.cmd->context == MCONSOLE_INTR) | 87 | if(req.cmd->context == MCONSOLE_INTR) |
88 | (*req.cmd->handler)(&req); | 88 | (*req.cmd->handler)(&req); |
89 | else { | 89 | else { |
90 | new = kmalloc(sizeof(*new), GFP_ATOMIC); | 90 | new = kmalloc(sizeof(*new), GFP_NOWAIT); |
91 | if(new == NULL) | 91 | if(new == NULL) |
92 | mconsole_reply(&req, "Out of memory", 1, 0); | 92 | mconsole_reply(&req, "Out of memory", 1, 0); |
93 | else { | 93 | else { |
@@ -415,7 +415,6 @@ static int mem_config(char *str) | |||
415 | 415 | ||
416 | unplugged = page_address(page); | 416 | unplugged = page_address(page); |
417 | if(unplug_index == UNPLUGGED_PER_PAGE){ | 417 | if(unplug_index == UNPLUGGED_PER_PAGE){ |
418 | INIT_LIST_HEAD(&unplugged->list); | ||
419 | list_add(&unplugged->list, &unplugged_pages); | 418 | list_add(&unplugged->list, &unplugged_pages); |
420 | unplug_index = 0; | 419 | unplug_index = 0; |
421 | } | 420 | } |
@@ -616,7 +615,7 @@ static void console_write(struct console *console, const char *string, | |||
616 | return; | 615 | return; |
617 | 616 | ||
618 | while(1){ | 617 | while(1){ |
619 | n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index); | 618 | n = min((size_t) len, ARRAY_SIZE(console_buf) - console_index); |
620 | strncpy(&console_buf[console_index], string, n); | 619 | strncpy(&console_buf[console_index], string, n); |
621 | console_index += n; | 620 | console_index += n; |
622 | string += n; | 621 | string += n; |
@@ -655,7 +654,6 @@ static void with_console(struct mc_request *req, void (*proc)(void *), | |||
655 | struct mconsole_entry entry; | 654 | struct mconsole_entry entry; |
656 | unsigned long flags; | 655 | unsigned long flags; |
657 | 656 | ||
658 | INIT_LIST_HEAD(&entry.list); | ||
659 | entry.request = *req; | 657 | entry.request = *req; |
660 | list_add(&entry.list, &clients); | 658 | list_add(&entry.list, &clients); |
661 | spin_lock_irqsave(&console_lock, flags); | 659 | spin_lock_irqsave(&console_lock, flags); |