Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp699820pxb; Tue, 5 Apr 2022 19:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiRt4DMcsw7B0xQyUCV+EygLyN2HHpv7xdKaV6l+++FDej8cdlKKLrT01KKG98PHV70/A/ X-Received: by 2002:a63:af02:0:b0:375:57f0:8af1 with SMTP id w2-20020a63af02000000b0037557f08af1mr5264302pge.188.1649211560599; Tue, 05 Apr 2022 19:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649211560; cv=none; d=google.com; s=arc-20160816; b=YZ+rbWNHthg3XQY4h+M9wLyFwSei1ONyTuD/s707WQ8sXQtnvz0mpKsZJn0cMFEv0g UNJ3M3kTCwIPAHUyZ7X4qtK2LXa5ve2u5PwU9R1c/MoKgkV86uId1w7mDEbqcFhSgMb9 y3PX0SMojQpU2rjseoP0B7GUkxQsCS5Qy945Rna9n/H7x0prYvmz2fWmOIARkvzXgkAN GrCrP9afpmW7Cy3Mvtmr/5IoW0xYV24xZxDG+2zOlYJvhN/EybtF2WZiaUa5ocXPP3KY r606Zac8bJSkSXQOq3pmW7Mg+oDxPO7BeNa7AxfvpP1lPnFzGas29Mm5riycz2BSjUc8 aCew== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=3cpKvzs0KKUIzsN3Bbjl/gUMUUeBJpcwDcloGoOE9Fg=; b=p8OO4lPUcL4uCAoE4nCIoZY9Ax6TzPSBoWmmbUwASBcTHA3wv861TUzE04L/QzXfwg Ij20ETavY0GrABmOC4gaO3yqnqh20qd6KB3jfi9+yq5uSVIBxvw+Im0kzbpMQjdi1s7z mlL3uJQ6grv4es3LPCgjsf4OwsJxbzxZTLOg2X5XhGmfCkDJ2QJNZOqnbXsSu14qYRVy itJlOSrv6tAf7/Y5WF2CBpOFG1uWxAeS1FfsZ8ugaq3Pbtp/NUe+FAzmjDDohASzoS5B WIoP9OuQp323CUn2oIgBLd/ZFnnsF0PDecHHHRv9e0o/iXnH31XFg/MsGhk6pMv+0ILG tWfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Uw9NTNC/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v25-20020a634819000000b003989594a149si14970407pga.388.2022.04.05.19.19.05; Tue, 05 Apr 2022 19:19:20 -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="Uw9NTNC/"; 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 S1385952AbiDEPPX (ORCPT + 99 others); Tue, 5 Apr 2022 11:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346693AbiDEJpV (ORCPT ); Tue, 5 Apr 2022 05:45:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 954D736686; Tue, 5 Apr 2022 02:31:22 -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 ams.source.kernel.org (Postfix) with ESMTPS id 49783B81C6E; Tue, 5 Apr 2022 09:31:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46064C385A4; Tue, 5 Apr 2022 09:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649151080; bh=wy56N3GzvYwz3j65YfFa+VXSzdPu9MSFvDzmV75JFcI=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=Uw9NTNC//zeTxqHZTEt4wLakcW6Vca5oWrRklfwR41ipRkQD1LKGG7M4UAp02aGd3 cGdIRa5b6cTKewezf1I9Y0medT9WnPanu8PiTQrk/VtC8ATTFt2pgz4CKGS+gmCrxM Csd12UL4VZTJELkoUiw6KDb4RA7pg8OBIRMN9nRmS/3H8yytd6dRUyFxSqtYL9gWCo h54HRHwAW7L/Pyb3SY1v50Ct+V2TteZDEZbbTQOaIGpOT3HadOvZHRQ+N7N/3yvG8B lGDalUeSuET+N3cxZfsnuSZyLtEc4eG6tT9Vzy6iGmDDrONkzbSDC/FgOL01D8Pz6f 2NDkk0PylUgrw== From: Mark Brown To: xiam0nd.tong@gmail.com, oder_chiou@realtek.com, lgirdwood@gmail.com, tiwai@suse.com, perex@perex.cz Cc: derek.fang@realtek.com, stable@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org In-Reply-To: <20220327081002.12684-1-xiam0nd.tong@gmail.com> References: <20220327081002.12684-1-xiam0nd.tong@gmail.com> Subject: Re: [PATCH] codecs: rt5682: fix an incorrect NULL check on list iterator Message-Id: <164915107801.276574.16249779388452959492.b4-ty@kernel.org> Date: Tue, 05 Apr 2022 10:31:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Sun, 27 Mar 2022 16:10:02 +0800, Xiaomeng Tong wrote: > The bug is here: > if (!dai) { > > The list iterator value 'dai' will *always* be set and non-NULL > by for_each_component_dais(), so it is incorrect to assume that > the iterator value will be NULL if the list is empty or no element > is found (In fact, it will be a bogus pointer to an invalid struct > object containing the HEAD). Otherwise it will bypass the check > 'if (!dai) {' (never call dev_err() and never return -ENODEV;) > and lead to invalid memory access lately when calling > 'rt5682_set_bclk1_ratio(dai, factor);'. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] codecs: rt5682: fix an incorrect NULL check on list iterator commit: c8618d65007ba68d7891130642d73e89372101e8 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