From: Johan Hovold <johan@kernel.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Manivannan Sadhasivam <mani@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] USB: serial: xr: fix NULL-deref on disconnect
Date: Mon, 1 Mar 2021 10:18:41 +0100 [thread overview]
Message-ID: <YDyxcQfUabhJruuA@hovoldconsulting.com> (raw)
In-Reply-To: <20210226115447.6ace5490@coco.lan>
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 <johan@kernel.org> 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 <mchehab+huawei@kernel.org>
> > Cc: Manivannan Sadhasivam <mani@kernel.org>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
>
> 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 <mchehab+huawei@kernel.org>
Thanks for testing, and thanks to Greg and Manivannan for the review.
Now applied.
Johan
next prev parent reply other threads:[~2021-03-01 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 10:08 [PATCH] USB: serial: xr: fix NULL-deref on disconnect Johan Hovold
2021-02-26 10:20 ` Greg KH
2021-02-26 10:54 ` Mauro Carvalho Chehab
2021-03-01 9:18 ` Johan Hovold [this message]
2021-02-26 10:57 ` Manivannan Sadhasivam
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=YDyxcQfUabhJruuA@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mchehab+huawei@kernel.org \
/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