Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp545716pxb; Tue, 5 Apr 2022 13:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydK6QwvxWmPvwThsmNnEr1UzlyRAgGAL/PfWoalj6WrBdqHuQFUHKEpHf14eUcZKnKBiE1 X-Received: by 2002:a17:90a:4217:b0:1c7:c203:b4f3 with SMTP id o23-20020a17090a421700b001c7c203b4f3mr6055900pjg.177.1649190814065; Tue, 05 Apr 2022 13:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649190814; cv=none; d=google.com; s=arc-20160816; b=mxWh5posXGzkxgJbT/2XPCB782pIltGNrB03alwyBboZ4opIDDNgb403ijvT7Cpoeq bzNo87P7/1qZI1NnrxD3Idtowbkr55kHJJkNd4538oakBLwBrGaTgx5wlXgtU2zskWvE 8ONjKbqWSenkVX/hTJUvKUpSzGDICPoy76gjl4xoy0nTLKQbyvW/APO7k0GVCP3922oY UuUnSEnU/l8bFz9Msga0ITgMUkl6vgg6uWNuwwJpUCuEm3TAF9Yg7oAkaLRysibFpfn+ lq6Z3oKjYav65eMdQKgxm7ySNEGfh27ka6aQnVtVyylSYncq4WEa8xkX21UKFYRqsjw9 9ilg== 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=tu0nPmBZeosw+osj3lsz6NgDi6XxhlvrkdpK8n0l0dE=; b=RKqsGc4fX+VQ67r6VALtJHYexscyRgYkdjl87z06EKbJ3R9wlY6r3lag3RDTFLblly ePmIrqD8r+wNBhqiKzNpnjdNHDflZIELRRF4LprkGFLsaC2WdfgN4g+RVcgzUN2Pz1bl lZ0Ezgz1emhXySkhfbl7l6HOFl5Uq7B+onZSKH6UM7q2jsEveGHWxRLDIKPXGXCiwSiR ePSUMgIa/OJamWhMuoBNFpx4kVTSgosE9F1pcmnbeMNN8mXQJKl6jdDV4NjbcnuNWLmZ oW4NmFOYvDi0I+JbwhypIBUeaCPOIXpl2LdsNziSMgeNRE5pkpaTdARwnvi9zWW9o4T8 4KHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="le/sBVDl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v5-20020a1709029a0500b00154a68405d3si12378394plp.134.2022.04.05.13.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 13:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="le/sBVDl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DC7760D6; Tue, 5 Apr 2022 13:28:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386443AbiDEPQI (ORCPT + 99 others); Tue, 5 Apr 2022 11:16:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346700AbiDEJpV (ORCPT ); Tue, 5 Apr 2022 05:45:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EA964992D; Tue, 5 Apr 2022 02:31:23 -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 BE012616D4; Tue, 5 Apr 2022 09:31:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F8C2C385A2; Tue, 5 Apr 2022 09:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649151082; bh=A4/cLM5NPo8irk/vpe7YE2iwcgOutJwMOohvACQXNIQ=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=le/sBVDlea0jPsjUT6cnlIpQm41Q0Zc3AatcaUBcVU/Za1NcXE0f21mYzoladnjrh 6zY022gpr3oSehDSCgDzKWgbLEhQN/FlWh3rx8TGn9nUdG+PP6v77D2GPp4p8E+0GK UFHd+KMCghI3PZ3qZ2vwg7PvRWtzL/WFn0doz+lRqSbRQIccajDNPnUNKhxVev6C8a wabnJm+Ecq9n0ZdyizW9frXLeKDd1KFEcRFY+iM3Uze8PEbIDcOkPq4Nf6Plma2On9 52KcSTQ21iZ8IcEbI8hkqpQvvDokBG6FL+YaRtx17HcypsQfhEYiWcYMkXrr0jARlV 1VnxuJm7sPoUg== 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: <20220327081300.12962-1-xiam0nd.tong@gmail.com> References: <20220327081300.12962-1-xiam0nd.tong@gmail.com> Subject: Re: [PATCH] codecs: rt5682s: fix an incorrect NULL check on list iterator Message-Id: <164915108018.276574.3161764909349816004.b4-ty@kernel.org> Date: Tue, 05 Apr 2022 10:31:20 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 27 Mar 2022 16:13:00 +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 > 'rt5682s_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: rt5682s: fix an incorrect NULL check on list iterator commit: acc72863e0f11cd0bedc888b663700229f9ba5ff 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