mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular
Date: Sat, 10 Oct 2015 15:18:03 -0400	[thread overview]
Message-ID: <20151010191802.GT14103@windriver.com> (raw)
In-Reply-To: <20151009133832.GA19165@ulmo>

[Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular] On 09/10/2015 (Fri 15:38) Thierry Reding wrote:

> On Wed, Aug 19, 2015 at 05:48:08PM -0400, Paul Gortmaker wrote:

[...]

> >  static struct platform_driver mpsc_driver = {
> >  	.probe	= mpsc_drv_probe,
> > -	.remove	= mpsc_drv_remove,
> >  	.driver	= {
> >  		.name	= MPSC_CTLR_NAME,
> >  	},
> 
> I don't think this is right. The driver can always be unbound from the
> device via sysfs, in which case it will now leak resources and leave
> behind a dangling UART port.

I suppose it does open the window for root to do something else stupid
he shouldn't be doing anyway...

I think the right thing to do here is for me to send a follow on patch
that does also set:

	.suppress_bind_attrs = true

in the above block, since this is a console device used on 2005 vintage
74xx based powerpc embedded targets, and is essentially always used in
conjunction with SERIAL_MPSC_CONSOLE=y -- there is no sane reason anyone
would ever want to unbind the builtin driver and lose the console.

I'll send a follow on patch doing the above if folks are in agreement
with the above logic.

Thanks,
Paul.
--

> 
> Thierry



  reply	other threads:[~2015-10-10 19:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 21:48 [PATCH v2 0/5] drivers/tty: make more bool drivers " Paul Gortmaker
2015-08-19 21:48 ` [PATCH 1/5] drivers/tty: make pty.c slightly more " Paul Gortmaker
2015-08-19 21:48 ` [PATCH 2/5] drivers/tty: make sysrq.c " Paul Gortmaker
2015-08-19 21:48 ` [PATCH 3/5] drivers/tty: make hvc_console.c " Paul Gortmaker
2015-08-19 21:48 ` [PATCH 4/5] drivers/tty: make serial/mpsc.c driver " Paul Gortmaker
2015-10-09 13:38   ` Thierry Reding
2015-10-10 19:18     ` Paul Gortmaker [this message]
2015-08-19 21:48 ` [PATCH 5/5] drivers/tty: make serial 8250_lpc18xx.c Kconfig a tristate Paul Gortmaker
2015-08-20  6:58   ` Joachim Eastwood
2015-09-26 22:53 ` [PATCH v2 0/5] drivers/tty: make more bool drivers explicitly non-modular Paul Gortmaker
2015-09-27 19:42   ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2015-08-09  0:51 [PATCH " Paul Gortmaker
2015-08-09  0:51 ` [PATCH 4/5] drivers/tty: make serial/mpsc.c driver " Paul Gortmaker

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=20151010191802.GT14103@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=thierry.reding@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

Powered by JetHome