Message ID | 20231003155558.27079-1-johan+linaro@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2183148vqb; Tue, 3 Oct 2023 08:59:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKvLh0Qx2lOUa0vEPl7Nfe54HEOpZndjQCcDf1WuNBgA9XiahyQqxWiBR8BVt4h1/5oU58 X-Received: by 2002:a05:6a20:5488:b0:134:73f6:5832 with SMTP id i8-20020a056a20548800b0013473f65832mr5264931pzk.16.1696348750911; Tue, 03 Oct 2023 08:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696348750; cv=none; d=google.com; s=arc-20160816; b=AAVolFzxGLxeXO7PFc75UAC62ww8yNKKo4OSxovVB/11icQtozchCqXNSjNNQlL5jT t3JvItwbLDGJJOy+Y6Xei+GfQQ5wGOC0M8WMRanZMSwZ6TWEiA7o9m+ELg7oV8M0mlFA Vb7GXhAXyoSYKlMAx/tThqk2f5gzGHjt2Dft6kDVM2msuLcWRTytGVHorn0txhPan14C NK4fRvdvE5DR/4OR3HoZNruLMjP++hN1qqM1dJhdKHAhua37QV/OiZ7xS1MCSa1uJ746 ZEs5UoAZM+PKqrnJ047/SvvcRTGPiBsKCx+J4mk4dLpQ4uDfqs1M+l4U88nqFGWDtraT asyg== 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=kAIAL4K+fr6MvpNvW5PcjQacisSatXjKJI9jgtb5UHA=; fh=vXRfSyB7LiTsq43vn8YCJvcCfHVAADLiAEyFV5ba4w0=; b=YHBssfsiWYtNmzPjXJWdi3BZb8XowM69meFVE0OHNyHZCpkkV+0HiAhfjIqeoUyE2I WxmhUnRoAC5iIHhL6NjiXX+VZyvGgTmX0iqhJvUPQ6R3ySVjCMvRQeKVrqB5D8fwj3Bu WTBz8cPWEbasPsuOaLh5kBsS8vxpeLIdOqhbS5KoXaOLIXH6TwuZz4+854UJtrZ1lOJh S02o78IYrJphyAgX9FWr+uVsBdj9EdtItg053EQY2mkgz6gPeoRfw4kyMuitok6YOoJh x6RL6+9eRdLCjUQpylu20FtajlzScWMqwsIQjOp8KgVuxseFXHKWn4vThhwbZXk1zrry wvUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBYUGpgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id eg26-20020a056a00801a00b0068fb986fcf3si1715730pfb.377.2023.10.03.08.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBYUGpgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 9C471816EBCB; Tue, 3 Oct 2023 08:59:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239453AbjJCP6l (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 11:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232218AbjJCP6e (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 11:58:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A61FAF for <linux-kernel@vger.kernel.org>; Tue, 3 Oct 2023 08:58:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0063C433C9; Tue, 3 Oct 2023 15:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696348710; bh=x4+F/ayjzolbI5Z0chsY8fDErsz5v4RnO2hda7AbeCk=; h=From:To:Cc:Subject:Date:From; b=IBYUGpgVFFgQoig5s2QW9LJjtYjJMW/WRBBlkYxbnXnMZ72pTEve2G2zYTs8NlzQC DMROuAtz1IOdXT2P7PH5FdCV2TyV7+4d+EQjSzOHLqYHZTd2v0m+wPGemgTuUu76+V DzsFOHEzOqMe9GBFpU+3L2CHK+MoMjTj72OQPe3km4ANp0YzfFJ++XYMhXZ8wWlyiM F3Oq2/pvgfp6fu79JHz3ushUpTm2PB7R06dNmYLJ0BqJJnrOzgNc5xV1XIWgYr7+B3 pXaj4vaMuVdbf4wYl6hR62AurNdj0Cy3OqHOzg6idqQCl6mCJSnW5UvTMnvyXrwNW2 UGGkHRPlmsqdA== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from <johan+linaro@kernel.org>) id 1qnhnF-00074l-2r; Tue, 03 Oct 2023 17:58:41 +0200 From: Johan Hovold <johan+linaro@kernel.org> To: Mark Brown <broonie@kernel.org> Cc: Liam Girdwood <lgirdwood@gmail.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH 0/7] ASoC: codecs: wcd938x: fix probe and bind error handling Date: Tue, 3 Oct 2023 17:55:51 +0200 Message-ID: <20231003155558.27079-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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:59:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778750588171521058 X-GMAIL-MSGID: 1778750588171521058 |
Series |
ASoC: codecs: wcd938x: fix probe and bind error handling
|
|
Message
Johan Hovold
Oct. 3, 2023, 3:55 p.m. UTC
The wcd938x codec driver happily ignores error handling, something which has bitten us in the past when we hit a probe deferral: https://lore.kernel.org/lkml/20230705123018.30903-1-johan+linaro@kernel.org/ Fix up the remaining probe and component bind paths that left resources allocated and registered after errors to avoid similar future issues. Johan Johan Hovold (7): ASoC: codecs: wcd938x: drop bogus bind error handling ASoC: codecs: wcd938x: fix unbind tear down order ASoC: codecs: wcd938x: fix resource leaks on bind errors ASoC: codecs: wcd938x: fix regulator leaks on probe errors ASoC: codecs: wcd938x: fix runtime PM imbalance on remove ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind ASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors sound/soc/codecs/wcd938x-sdw.c | 27 +++++++++++- sound/soc/codecs/wcd938x.c | 76 +++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 20 deletions(-)
Comments
On Tue, 03 Oct 2023 17:55:51 +0200, Johan Hovold wrote: > The wcd938x codec driver happily ignores error handling, something which > has bitten us in the past when we hit a probe deferral: > > https://lore.kernel.org/lkml/20230705123018.30903-1-johan+linaro@kernel.org/ > > Fix up the remaining probe and component bind paths that left resources > allocated and registered after errors to avoid similar future issues. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/7] ASoC: codecs: wcd938x: drop bogus bind error handling commit: bfbc79de60c53e5fed505390440b87ef59ee268c [2/7] ASoC: codecs: wcd938x: fix unbind tear down order commit: fa2f8a991ba4aa733ac1c3b1be0c86148aa4c52c [3/7] ASoC: codecs: wcd938x: fix resource leaks on bind errors commit: da29b94ed3547cee9d510d02eca4009f2de476cf [4/7] ASoC: codecs: wcd938x: fix regulator leaks on probe errors commit: 69a026a2357ee69983690d07976de44ef26ee38a [5/7] ASoC: codecs: wcd938x: fix runtime PM imbalance on remove commit: 3ebebb2c1eca92a15107b2d7aeff34196fd9e217 [6/7] ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind commit: f0dfdcbe706462495d47982eecd13a61aabd644d [7/7] ASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors commit: c5c0383082eace13da2ffceeea154db2780165e7 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark