From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:35256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbeJRXT1 (ORCPT ); Thu, 18 Oct 2018 19:19:27 -0400 Date: Thu, 18 Oct 2018 17:17:56 +0200 From: Greg Kroah-Hartman To: Krzysztof Kozlowski Cc: stable@vger.kernel.org, Felipe Balbi , Stephen Warren , linux-kernel@vger.kernel.org, Felipe Balbi Subject: Re: [PATCH stable v4.4+] usb: gadget: serial: fix oops when data rx'd after close Message-ID: <20181018151756.GA10600@kroah.com> References: <1539872900-13011-1-git-send-email-krzk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1539872900-13011-1-git-send-email-krzk@kernel.org> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Oct 18, 2018 at 04:28:20PM +0200, Krzysztof Kozlowski wrote: > From: Stephen Warren > > commit daa35bd95634a2a2d72d1049c93576a02711cb1a upstream > > When the gadget serial device has no associated TTY, do not pass any > received data into the TTY layer for processing; simply drop it instead. > This prevents the TTY layer from calling back into the gadget serial > driver, which will then crash in e.g. gs_write_room() due to lack of > gadget serial device to TTY association (i.e. a NULL pointer dereference). > > Signed-off-by: Stephen Warren > Signed-off-by: Felipe Balbi > Signed-off-by: Krzysztof Kozlowski Now queued up, thanks. greg k-h