From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752215AbbJJTSL (ORCPT ); Sat, 10 Oct 2015 15:18:11 -0400 Received: from mail.windriver.com ([147.11.1.11]:45306 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbbJJTSI convert rfc822-to-8bit (ORCPT ); Sat, 10 Oct 2015 15:18:08 -0400 Date: Sat, 10 Oct 2015 15:18:03 -0400 From: Paul Gortmaker To: Thierry Reding CC: , Greg Kroah-Hartman , Jiri Slaby , Subject: Re: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular Message-ID: <20151010191802.GT14103@windriver.com> References: <1440020889-12120-1-git-send-email-paul.gortmaker@windriver.com> <1440020889-12120-5-git-send-email-paul.gortmaker@windriver.com> <20151009133832.GA19165@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20151009133832.GA19165@ulmo> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [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