[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170823054438.GA728@jagdpanzerIV.localdomain>
Date: Wed, 23 Aug 2017 14:44:38 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Byungchul Park <byungchul.park@....com>,
Bart Van Assche <Bart.VanAssche@....com>,
peterz@...radead.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
kernel-team@....com
Subject: Re: possible circular locking dependency detected [was: linux-next:
Tree for Aug 22]
On (08/23/17 13:35), Boqun Feng wrote:
[..]
> > > printk(KERN_CONT ");\n");
> >
> > KERN_CONT and "\n" should not be together. "\n" flushes the cont
> > buffer immediately.
> >
>
> Hmm.. Not quite familiar with printk() stuffs, but I could see several
> usages of printk(KERN_CONT "...\n") in kernel.
>
> Did a bit research myself, and I now think the inappropriate use is to
> use a KERN_CONT printk *after* another printk ending with a "\n". Am I
> missing some recent changes or rules of KERN_CONT?
has been this way for quite some time (if not always).
LOG_NEWLINE results in cont_flush(), which log_store() the content
of KERN_CONT buffer.
if we see that supplied message has no \n then we store it in a
dedicated buffer (cont buffer)
if (!(lflags & LOG_NEWLINE))
return cont_add();
return log_store();
we flush that buffer (move its content to the kernel log buffer) when
we receive a message with a \n or when printk() from another task/context
interrupts the current cont line and, thus, forces us to flush.
-ss
Powered by blists - more mailing lists