From patchwork Wed Jun 7 10:05:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp279215rwl; Wed, 7 Jun 2023 04:31:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6p5Dwsv6PhQlSs5/z/ge0ZrK0WXRZ9bnfY2YOEAkLrK4meoZlGLhqRWb8YaesK4eBQt5Z0 X-Received: by 2002:a17:90b:1916:b0:256:c3dc:dae6 with SMTP id mp22-20020a17090b191600b00256c3dcdae6mr4645725pjb.31.1686137495846; Wed, 07 Jun 2023 04:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686137495; cv=none; d=google.com; s=arc-20160816; b=S4NvJbWbBVj3p+1wbCsuo2tCtbmEjGiKCE486Rsl6T1skGBf5XOqzDq8izaVyukT7e fmttKOZpoZKVVuUGtRaTmOP7kA9S/IRzGrXj8jPHt1XeqLIoqpuxeB5gXlP2p9PoN3JQ CzxW0NvJ+6jr4ab+Eth0njvKtbB0Oy2IHs+id5hqgQw1NV2LfBtvS8U2eRjYozMdYaFp LwkLlI4LvIvG3+AD3u2Wmkc1WU7++xvFFo/DzuLxSGTgryCUstLRwBLUd5RkwPgEUY/8 XB5ZERZMQ7DX+7QcROCDWl+oI2C/mclHGf2i1F/fUMQMWURj7nxy5WXY3T/FddnmMSKj Yj5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ts9EZhEkDeYBH+su4wFD3eVGKUjMflPvLRdKGgx24yI=; b=t7yVDtzoixIdPWSGGG/1SsId/y91R/NZD3zKdV9Q3PrfU6uyejoDRaQJZ2lrqHEPoC dhfifKpyt0bx/U9e33osq/a+rNa16ZzdzVrGVZPhyo+rKSE7jw4M2sLRUOSkm0G4sXy8 YAaoSnRSNXiumtCQLErGM2JIa9aQpjJbEm2j9fMOo71f06uIQPcDzvGAJ2ZVfLAI7UTv q2ZQZdbaxkyYQrgmhcP+9NXdOGUa4nC9Iv5by3P+08bXf8MYgPd5suoFdPZv5yAAW55V gNrjUMEsDe1xGNywACe+vz40wygGlaTn/97R2jsNj5j2nS0ffVV7zlOyLD8Df1IiXaUD y3RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a2X0ZIQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a17090a7e1100b0025357108059si992588pjl.44.2023.06.07.04.31.18; Wed, 07 Jun 2023 04:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a2X0ZIQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240243AbjFGLRN (ORCPT + 99 others); Wed, 7 Jun 2023 07:17:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239459AbjFGLRF (ORCPT ); Wed, 7 Jun 2023 07:17:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8EFAE62; Wed, 7 Jun 2023 04:17:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BCD163DB0; Wed, 7 Jun 2023 11:17:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83DD1C433D2; Wed, 7 Jun 2023 11:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686136623; bh=8FGn7roe0ypJLHcbQ2uIfQnhmgbdqM4GY7q9Gx4ZKuk=; h=From:To:Cc:Subject:Date:From; b=a2X0ZIQpxsagDbxhmgnGmNaUc05kt63lVUMQHV5O47vDS7uaifFdAhZKtvlcWPrZK quUb5duTd884UDAj4rfiGEsQsYLpvDSNRyAPN0h2Ps/UxjfkXisuOKRf/oMqbVemvb OLDFF3rLCNpKHPtfMiyctYJwnre1c0nqswOZ4Ygvs8JgAANicQf7im+VTWRqSB9Yz/ iXTGtUvk9wKJtZeUyp4oN4a0/LpGCR/mLCNdPl/UB8SN/YfpoSBDKefKUeO1ZkEduK AHvHK+xrA7e7O9jbICklu7VY60CjngTMPJNqtpN3ayZ095zu3P1JrAb3S5moWl5SVM iOP1CQtEFJmqg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1q6rAM-0008LQ-AV; Wed, 07 Jun 2023 13:17:26 +0200 From: Johan Hovold To: Thinh Nguyen Cc: Greg Kroah-Hartman , Andy Gross , Bjorn Andersson , Konrad Dybcio , Krishna Kurapati , Manivannan Sadhasivam , linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 0/2] USB: dwc3: qcom: fix NULL-deref on suspend Date: Wed, 7 Jun 2023 12:05:38 +0200 Message-Id: <20230607100540.31045-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768043310618535599?= X-GMAIL-MSGID: =?utf-8?q?1768043310618535599?= Some dwc3 glue drivers are currently accessing the driver data of the child core device directly, which is clearly a bad idea as the child may not have probed yet or may have been unbound from its driver. This series fixes some of the symptoms of these layering violations as fixing the glue drivers properly is going to take a fair bit of work. Johan Johan Hovold (2): USB: dwc3: qcom: fix NULL-deref on suspend USB: dwc3: fix use-after-free on core driver unbind drivers/usb/dwc3/core.c | 5 +++++ drivers/usb/dwc3/dwc3-qcom.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)