From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0435C33CB1 for ; Thu, 16 Jan 2020 16:18:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C08A1206D5 for ; Thu, 16 Jan 2020 16:18:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="ncSlWLgN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="n4IOWUjT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbgAPQSe (ORCPT ); Thu, 16 Jan 2020 11:18:34 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38059 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgAPQSe (ORCPT ); Thu, 16 Jan 2020 11:18:34 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E578F2227F; Thu, 16 Jan 2020 11:18:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Jan 2020 11:18:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=07X6qRMK0Px/dKmBtZxcPHfBL1U lPR0tIauYEzAigpY=; b=ncSlWLgNcr3sNgec8rqVNm6lME7LtFrquOVwaOKoB7m Y8AHkVBB2ux32PYWdjV3nfy7F2pPIEfRF5KUUfcS5LBKNvm3njp6HR+89VR4FtU9 yGtIg8agkoSnn2BikxaYcHyEY1Nz/yJj7JczlSUHaEtLW8ixGjTp5hANgLwMHscv TPSmXh/kZ1zUkwpe8BK1D/b+vuzyzyih+hnBAFWI2LEAuR9ihbF0/R9zfiTM3wOX bXEaczZVG+z4ExmR3pQEG13OEfadAsGTk/OG+3nD11n1ebUp8wR43YtvxMy1ShlP IpFEV3WfF9qx+RYVoXNOqII+tAQKWsrOk4pU7+M4rOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=07X6qR MK0Px/dKmBtZxcPHfBL1UlPR0tIauYEzAigpY=; b=n4IOWUjT+0uQLGEMzXEJ4D h0boZTnLXz/VOalQtszchgo1atM26P593hiPDmPvzF+z98BaYOHYqcgg1w95JzFN My2wNEgZKnVDiPChFtVCK1CjX2b3ABCRasks3jBjrTIKJYqsn1Tx1g7Mt4a5eJbA HGMGwzzK4IUCoJwBJP9p3Ieqs1w557nAnuQJeZOmwGJ3vLsx603pyJQ2RcMm4F88 JprxgP85AMQiC8iUu2Qk3GzjqJ4XM/AqkU1OSDBXPly/4q78cx2EPsdOgUm47FSa v+fqLJZwjV1AUvyg0+FxLNFZW+GdNc6YbB++ArmpoF/kd698lQ/1fvfBdaafB9jA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtdehgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghgucfm jfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecukfhppeekfedrkeeirdekledruddtje enucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhmnecuvehl uhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 64CA68005B; Thu, 16 Jan 2020 11:18:32 -0500 (EST) Date: Thu, 16 Jan 2020 17:18:29 +0100 From: Greg KH To: Johan Hovold Cc: linux-usb@vger.kernel.org, stable Subject: Re: [PATCH] USB: serial: suppress driver bind attributes Message-ID: <20200116161829.GA909791@kroah.com> References: <20200116160705.5199-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200116160705.5199-1-johan@kernel.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Jan 16, 2020 at 05:07:05PM +0100, Johan Hovold wrote: > USB-serial drivers must not be unbound from their ports before the > corresponding USB driver is unbound from the parent interface so > suppress the bind and unbind attributes. > > Unbinding a serial driver while it's port is open is a sure way to > trigger a crash as any driver state is released on unbind while port > hangup is handled on the parent USB interface level. Drivers for > multiport devices where ports share a resource such as an interrupt > endpoint also generally cannot handle individual ports going away. > > Cc: stable > Signed-off-by: Johan Hovold > --- > drivers/usb/serial/usb-serial.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c > index 8f066bb55d7d..dc7a65b9ec98 100644 > --- a/drivers/usb/serial/usb-serial.c > +++ b/drivers/usb/serial/usb-serial.c > @@ -1317,6 +1317,9 @@ static int usb_serial_register(struct usb_serial_driver *driver) > return -EINVAL; > } > > + /* Prevent individual ports from being unbound. */ > + driver->driver.suppress_bind_attrs = true; We can still unbind the usb driver though, right? If so, this is fine with me. thanks, greg k-h