From: Petr Mladek <pmladek@suse.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Helge Deller <deller@gmx.de>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-parisc@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v1] parisc: Use for_each_console() helper
Date: Thu, 30 Jan 2020 15:07:49 +0100 [thread overview]
Message-ID: <20200130140748.ugetnys4vabf6vqx@pathway.suse.cz> (raw)
In-Reply-To: <20200127094722.GU32742@smile.fi.intel.com>
On Mon 2020-01-27 11:47:22, Andy Shevchenko wrote:
> On Mon, Jan 27, 2020 at 09:48:58AM +0100, Helge Deller wrote:
> > On 25.01.20 11:25, Andy Shevchenko wrote:
> > > On Fri, Jan 24, 2020 at 09:59:48AM -0800, James Bottomley wrote:
>
> ...
>
> > > By the way, consider this code from register_console()
> > >
> > > for_each_console(bcon)
> > > if (bcon->flags & CON_BOOT)
> > > unregister_console(bcon);
> > >
> > > It works based on assumption that next pointer of the just unregistered console
> > > is not damaged. So, My initial patch will work in the same way.
> >
> > Yeah, but that's a typical use-after-free issue, which I wouldn't count on.
>
> I think here is misinterpretation, i.e. unregister != free.
> Entire console code is written in the assumption that console is not being
> freed when unregistered.
Honestly, I am not sure if this is true for all console drivers
and if it is by design.
I would prefer to stay on the safe side and keep the original
code. Hotplug practices are more and more popular as everything
gets virtualized.
Best Regards,
Petr
prev parent reply other threads:[~2020-01-30 14:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 16:07 [PATCH v1] parisc: Use for_each_console() helper Andy Shevchenko
2020-01-24 16:39 ` James Bottomley
2020-01-24 17:38 ` Andy Shevchenko
2020-01-24 17:59 ` James Bottomley
2020-01-25 10:25 ` Andy Shevchenko
2020-01-27 8:48 ` Helge Deller
2020-01-27 9:47 ` Andy Shevchenko
2020-01-30 14:07 ` Petr Mladek [this message]
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=20200130140748.ugetnys4vabf6vqx@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.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).