From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
syzbot <syzbot+43e93968b964e369db0b@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, rostedt@goodmis.org,
syzkaller-bugs@googlegroups.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: possible deadlock in console_unlock
Date: Fri, 15 Jun 2018 17:38:04 +0900 [thread overview]
Message-ID: <20180615083804.GB8964@jagdpanzerIV> (raw)
In-Reply-To: <20180608081855.ctqakvwmg27aydby@pathway.suse.cz>
On (06/08/18 10:18), Petr Mladek wrote:
[..]
> > Could be.
> > The good thing about printk_safe is that printk_safe sections can nest.
> > I suspect there might be locks/printk_safe sections nesting at some
> > point. In any case, switching to a new flavor of printk_safe will be
> > pretty easy - just replace printk_safe_enter() with printk_foo_enter()
> > and the same for printk_save_exit().
>
> We could allow nesting. It is just a matter of how many bits we
> reserve for it in printk_context variable.
[..]
> In each case, I would like to keep the printk_safe context usage
> at minimum. It has its own problems caused by limited per-cpu buffers
> and the need to flush them.
May be. Every new printk_safe flavour comes with increasing memory
usage. We already have a bunch of pages pinned [and mostly unused]
to every CPU for printk_nmi and printk_safe. I'm a little unsure if
we have enough reasons to pin yet another bunch of pages to every
CPU. After all printk_safe is not used very commonly, so all in all
I think we should be fine with printk_safe buffers for the time being.
We always can introduce new printk_safe mode later.
> It is basically needed only to prevent deadlocks related to logbuf_lock.
I wouldn't say that we need printk_safe for logbuf_lock only.
printk_safe helps us to avoid deadlocks on:
- logbuf_lock spin_lock
- console_sem ->lock spin_lock
- console_owner spin_lock
- scheduler ->pi_lock spin_lock
- and probably something else.
-ss
next prev parent reply other threads:[~2018-06-15 8:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 13:17 possible deadlock in console_unlock syzbot
2018-06-07 4:44 ` syzbot
2018-06-07 5:10 ` Sergey Senozhatsky
2018-06-07 11:00 ` Petr Mladek
2018-06-07 11:40 ` Tetsuo Handa
2018-06-07 14:03 ` Sergey Senozhatsky
2018-06-07 14:01 ` Sergey Senozhatsky
2018-06-08 8:18 ` Petr Mladek
2018-06-15 8:38 ` Sergey Senozhatsky [this message]
2018-06-19 8:04 ` Petr Mladek
2018-06-19 8:08 ` Sergey Senozhatsky
2019-02-20 10:52 ` Tetsuo Handa
2019-11-25 2:41 ` syzbot
2019-02-16 6:36 Yao HongBo
2019-02-16 7:21 ` Sergey Senozhatsky
2019-02-16 7:46 ` Sergey Senozhatsky
2019-02-16 7:59 ` Yao HongBo
2019-02-18 5:46 ` Sergey Senozhatsky
2019-02-18 12:09 ` Yao HongBo
2019-02-18 14:07 ` Yao HongBo
2019-02-19 1:32 ` Sergey Senozhatsky
2019-02-19 2:48 ` Yao HongBo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180615083804.GB8964@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=syzbot+43e93968b964e369db0b@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).