lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available
On (05/19/17 11:58), Sergey Senozhatsky wrote:
> > void printk_nmi_exit(void)
> > {
> > - this_cpu_and(printk_context, ~PRINTK_NMI_CONTEXT_MASK);
> > + this_cpu_and(printk_context,
> > + ~(PRINTK_NMI_CONTEXT_MASK ||
> > + PRINTK_NMI_DEFERRED_CONTEXT_MASK));
> > }

[..]

> the problem is that
>
> `PRINTK_NMI_CONTEXT_MASK || PRINTK_NMI_DEFERRED_CONTEXT_MASK' is 0x01

d'oh... forgot to copy-paste this...

---

diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
index 6fec9cfb9a69..b6ff3fe4370a 100644
--- a/kernel/printk/printk_safe.c
+++ b/kernel/printk/printk_safe.c
@@ -324,7 +324,7 @@ void printk_nmi_enter(void)
void printk_nmi_exit(void)
{
this_cpu_and(printk_context,
- ~(PRINTK_NMI_CONTEXT_MASK ||
+ ~(PRINTK_NMI_CONTEXT_MASK |
PRINTK_NMI_DEFERRED_CONTEXT_MASK));
}

---
-ss

\
 
 \ /
  Last update: 2017-05-19 06:38    [W:0.106 / U:3.372 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site