Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp683468rdb; Fri, 17 Nov 2023 09:38:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IG98mE0HZXqlU/g1QycuvJqsWnT+csqfTl3U1Y3N25dFg1fyaY1c7XN5DUlspuff5rwR2Hw X-Received: by 2002:a17:90b:1648:b0:283:2047:2c7d with SMTP id il8-20020a17090b164800b0028320472c7dmr168885pjb.33.1700242723921; Fri, 17 Nov 2023 09:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700242723; cv=none; d=google.com; s=arc-20160816; b=N542MG3f6PBX8E6dAzv6JoNzF+xId1HZDq69KVE8uZ6Co65l/kEynxn5HWgsYaIva5 8OrWbUGChlQ76iYc0qVWXLRgVvJ/TC75CttyxbVr4E5D7sht9THknZG0xhqag9rR5Oc2 4GRczUibubYzsMhPgx2i6Ur48fiNH51x9B1+9dCqq5HvwxIurdVJE5kBhIEX/wYP6I6w EhOuBN819L7KMMuwOBChARZs+AasF5Si4H+wSGonu4dC4hH+xWX9T3GmwScZbGaQvimr r0MoxHuVjFbx8BMGn+Bh4o+tR2OCNWMqQaTp8veoWAySxwZ/a76GcgyQ0uN6tVlAHsM4 ZMYg== 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=+sO2ofpXTysHAooH+mMazS/VDIHQ2P72FiD3W6E9VlQ=; fh=5YLC7FhBjPlPuzyWSdvJbjRUzXTUgp22G+zSVnjVn/o=; b=I5FAy3YO0pfTHe0yPbnwtzGZj2OPUfPVnmfVtyANDVYLvQc45RxUfT6unZfQkX4Na4 4vkAPg18/bT6BfM56H/90zaQhVUUM0p72y2hF+AgVHxQeRExsJcKVRtmXGZqXKGS/lVp vyGJS/gF+Au0nv7VuxXe0LkW3cBWyRCHg7JCfUcDSe2j4Lx4RmmG3I60mbF9rM5T40na tJRjR7UGjIjP25Rwx1E61+hIyYKl1j86P5Kgynh9BxweHJ2H4dk1DdeKjjPkUIk2Iwcf zDF5B4jGdR7h8VaLHoUCYdCyxby+xNqIef6SAYAqOJGwFvUUhU3NGo3OFP46cy/inM4T YZAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mtKlfPUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id e2-20020a17090ab38200b00274d3f62044si2286281pjr.111.2023.11.17.09.38.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 09:38:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mtKlfPUJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E60DC8342FF2; Fri, 17 Nov 2023 09:38:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346176AbjKQRiN (ORCPT + 99 others); Fri, 17 Nov 2023 12:38:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346173AbjKQRiM (ORCPT ); Fri, 17 Nov 2023 12:38:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C343E10E5 for ; Fri, 17 Nov 2023 09:38:09 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66A95C433C9; Fri, 17 Nov 2023 17:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700242689; bh=EUDBFroF5TjmYX0MrqbQ4lm7E/YuA+W3eE3VkPGKcm4=; h=From:To:Cc:Subject:Date:From; b=mtKlfPUJjJanONH237bSO3hOyU3SFX6xd57lxI10FihF5J/Mibv8D4PbuIiO4F5iy d4WA6/sHLhtXtn85tmoz8qRflR9TgpG14tbbU/u2a+SMRM04OTf2y5kJnuo0mfTcaE gQEg3YiAE39DARcXgaIYF5Ia1GBGkJ168le7YTOy0vg6tGGvcbwVyn7HDnnam8h3LV zJcX6KP7XzZSux28CArPbMBqEOCUU/OawwwhIYsz5NMxZWpfI21s3i3LoJkBgHAJ2H AYbrHhzqOdeRqKQjNWy+AcyBPetP5rOABkVxIGI+Tc5v3faQwuhgO9stvbnF/Q9zUT 9E3RhmkCzm4fA== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r42nF-0005Vo-0K; Fri, 17 Nov 2023 18:38:13 +0100 From: Johan Hovold To: Greg Kroah-Hartman Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Thinh Nguyen , Krishna Kurapati PSSNV , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 0/3] USB: dwc3: qcom: fix resource leaks on probe deferral Date: Fri, 17 Nov 2023 18:36:47 +0100 Message-ID: <20231117173650.21161-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 17 Nov 2023 09:38:37 -0800 (PST) When reviewing the recently submitted series which reworks the dwc3 qcom glue implementation [1], I noticed that the driver's tear down handling is currently broken, something which can lead to memory leaks and potentially use-after-free issues on probe deferral and on driver unbind. Let's get this sorted before reworking driver. Note that the last patch has only been compile tested as I don't have access to a sdm845 device. Johan [1] https://lore.kernel.org/lkml/20231016-dwc3-refactor-v1-0-ab4a84165470@quicinc.com/ Johan Hovold (3): USB: dwc3: qcom: fix resource leaks on probe deferral USB: dwc3: qcom: fix software node leak on probe errors USB: dwc3: qcom: fix ACPI platform device leak drivers/usb/dwc3/dwc3-qcom.c | 57 +++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 14 deletions(-) -- 2.41.0