Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243978

Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular
Date 2015-10-10 21:20 +0200
Message-ID <qi7Qu-1Ip-9@gated-at.bofh.it> (permalink)
References <pZjp8-1sc-3@gated-at.bofh.it> <pZjyO-1GO-25@gated-at.bofh.it> <qhG3T-3xZ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly  non-modular Thierry Reding <thierry.reding@gmail.com> - 2015-10-09 15:40 +0200
  Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly  non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-10-10 21:20 +0200

csiph-web