Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp15172pxb; Tue, 2 Mar 2021 17:28:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+aZEkEW/1BR7tl9zU+amXg+ZyXzVV50Ew2K5w/c3mxrOOw9T1M+vYgMuAYdARvincViRc X-Received: by 2002:a17:906:3fc3:: with SMTP id k3mr23584209ejj.522.1614734921620; Tue, 02 Mar 2021 17:28:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614734921; cv=none; d=google.com; s=arc-20160816; b=lgGqgkTBe49nTiEjTH6bIFWjdhXWDzKItWvN85a2NHJAlQ60bEXpzWBl2hbo/f10DY GGQ4oyNf9oLZika1029cWRKcZdurhL30f78K87YhIgERORJ8f3qMfgsDKE45UgauOJxC v4JMQcJ60RxHZXF7fuyaC6he5Aa7oF1CahQxAK+htS9HlHkhGLGnknWhsXehfmH2UQJj Q+z9MGoSnp8aDgFvZgU0/y6iBZFUERBJCimnv5GNhGYtmTSSdGSaR8VCYGBxaHLaGJEh +JollfVUDHPPo/xh/RAFz89B/Jbyd47YpKjfoEaYt3gzL2cSce4alnMb9QrKScuVwUUY vMfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KGkJMziZCeCsv4GlGRmQSxWuuNmBMVAR2rKmo+YALL4=; b=JRRIwvaLSu0lsMNCB5SvYEb3CxHe0g/hnijrcPvWjn0oBi11w6n7sqGa9AqrPqOeZu kA3EBLuGOS9oNQRCjWhOETfZdczhnaJRmCP7ohEBZJd/k/NvBOFnD18gniM4WcsEyxk6 OhQteygjpX8BGJLw+8VG5UNCH5ZBK9sdtob6hgbOE8/HkjBRpCeOrVcuCP3eGHYkI3/k UFqH0UvpRvXyUjqr0joLySj8UaoteKsPijKrnRPpN6romwlE+BTKx4MEEWWqNNDdelv1 SfW60pg+COECzguNYehNsao8GDF6tqSaKr7kdpiud0SaoXBFnp3s5cX+2Lk4a6yxoOJ8 kdFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ATP+2R9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si15043635eji.501.2021.03.02.17.28.19; Tue, 02 Mar 2021 17:28:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ATP+2R9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233830AbhCAJTG (ORCPT + 99 others); Mon, 1 Mar 2021 04:19:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:42678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbhCAJTF (ORCPT ); Mon, 1 Mar 2021 04:19:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61AFF64E01; Mon, 1 Mar 2021 09:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614590304; bh=gVfBaC9t4lrXYWRSjC58vVIt9/hAhY6mrbALiLX78AI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ATP+2R9F4edZqLGKdjeEQQ1gGWuAM5vuZtw2Hx0SPgfcONLwBb+wtGGjqm56RNsTn sN6cg03B9gblos0R7mEJ7FtRUd8OTXWIuM9nyIlKQxYrJ6BSD+5I6SuR72XWPewoo+ Q6FkQk6aj81uuwwe8Ho9L6KMEMsWX2gXiZ/3L05Qh0HQ9hxAQiP3ZoqkkqF8IaIaIK vgVqkKjHa6AdL2AK72Wox+2PgepVvV1wEXEwmvYar9Pus6Cv+Zv6v7H0AKe53ND6SW x8BQ6nwzgClOk4k10xyLjlrcrBExrJl/HC/+EPcIcwXld/vY7qqZAocEjjI5U1/uZs AlJC1gLTjzdIQ== Received: from johan by xi.lan with local (Exim 4.93.0.4) (envelope-from ) id 1lGehN-0007sg-TM; Mon, 01 Mar 2021 10:18:41 +0100 Date: Mon, 1 Mar 2021 10:18:41 +0100 From: Johan Hovold To: Mauro Carvalho Chehab Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Greg Kroah-Hartman Subject: Re: [PATCH] USB: serial: xr: fix NULL-deref on disconnect Message-ID: References: <20210226100826.18987-1-johan@kernel.org> <20210226115447.6ace5490@coco.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226115447.6ace5490@coco.lan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 11:54:47AM +0100, Mauro Carvalho Chehab wrote: > Em Fri, 26 Feb 2021 11:08:26 +0100 > Johan Hovold escreveu: > > > Claiming the sibling control interface is a bit more involved and > > specifically requires adding support to USB-serial core for managing > > either interface being unbound first, something which could otherwise > > lead to a NULL-pointer dereference. > > > > Similarly, additional infrastructure is also needed to handle suspend > > properly. > > > > Since the driver currently isn't actually using the control interface, > > we can defer this for now by simply not claiming the control interface. > > > > Fixes: c2d405aa86b4 ("USB: serial: add MaxLinear/Exar USB to Serial driver") > > Reported-by: Mauro Carvalho Chehab > > Cc: Manivannan Sadhasivam > > Signed-off-by: Johan Hovold > > That solved the issue with XR21V1410: > > [ 8176.265862] usbcore: registered new interface driver xr_serial > [ 8176.265885] usbserial: USB Serial support registered for xr_serial > [ 8176.265921] xr_serial 2-1:1.1: xr_serial converter detected > [ 8176.266041] usb 2-1: xr_serial converter now attached to ttyUSB0 > [ 8176.268023] printk: console [ttyUSB0] enabled > [ 8186.512841] usb 2-1: USB disconnect, device number 5 > [ 8186.513131] printk: console [ttyUSB0] disabled > [ 8186.513340] xr_serial ttyUSB0: xr_serial converter now disconnected from ttyUSB0 > [ 8186.513376] xr_serial 2-1:1.1: device disconnected > > Tested-by: Mauro Carvalho Chehab Thanks for testing, and thanks to Greg and Manivannan for the review. Now applied. Johan