Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp927914pxm; Thu, 3 Mar 2022 07:15:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqaDAmAaHhI02lt5dDtUkCmWSeVNp496YYO6e2Lq/y6vPZaFdPDNF7rG3TdekdWiHzN+Fk X-Received: by 2002:a17:903:228f:b0:151:8379:9438 with SMTP id b15-20020a170903228f00b0015183799438mr14001408plh.51.1646320502272; Thu, 03 Mar 2022 07:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646320502; cv=none; d=google.com; s=arc-20160816; b=eCYPrDds68XKgsgMP1P2bkr5Pov6OVhpv2CCEOBWZppIKszMoGg0UINHiCETJ/pYs5 KJP2ESbY+Ec+6J3ERv2Cw1OnhocGu0DmltK9ZVV/K7Ze8+BOckRTKUyXq82LUZ9oG8dh fhy3VOTYP+GqngEGhGSaoOMwep9k8V7rPHIh//e6wNkEoETZ6rGCAYTxxKfA/pNS99gd tizLyY8H+ZHUUZAGuHIj4XMso4n1qM93FgZXlSwAa1GQapFt07ChNO1ki77OJEO0KWr1 QUoOlNBbK2hnLGae1JHB7yB6wOCfDFUaKviDUx4oRxycoEBECPKVucKbNjater4HK3Gd 5sGw== 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=s3hBNzk7PFS+esTOnKiSCK28ULvgHThD6ZKQ0bQXmNc=; b=wPIo9668qzud/zx/e5dHV0XTXTfhExEobXp69kVbHy9TSrB1Vc+edb3nY0Ieh9fEyF tLRJaQwAw95ZUyHuR34r+q8TrIR38XTmMHiMHatiGZGrmZrhWGOKoId28fQZXm3HjCRO R5hFXsp6ubrJYJhuAcN/7Qt157qyLGa5dRUXmG+banJUhjEvGpMtpa+OSVgIho4M9Nbr V6g7es5pEoECS1iNdb2bp7szbbaCHkcRVZNfxicVqw5YLCDypdHDJIPqcFBfrYxE+6Ld tCrIbkKx0DhYFlWZWAiHJgut229I8V0M9kPKtIhkHTeFwbQP0D4OxwNz3Kt3AmsFgCB0 A7gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bV1p3W54; 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 i18-20020a170902c95200b0014af1b7c58esi2615679pla.163.2022.03.03.07.14.36; Thu, 03 Mar 2022 07:15:02 -0800 (PST) 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=bV1p3W54; 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 S233740AbiCCNeH (ORCPT + 99 others); Thu, 3 Mar 2022 08:34:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbiCCNeD (ORCPT ); Thu, 3 Mar 2022 08:34:03 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A856858E6A for ; Thu, 3 Mar 2022 05:33:16 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 54D53CE26C8 for ; Thu, 3 Mar 2022 13:33:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77C6AC340ED; Thu, 3 Mar 2022 13:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646314393; bh=Ei0hkSjteYCI4Mye6PPB4xKcN0OiLDypiHdbTkPJbMk=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=bV1p3W54n9fe12HXoG10azO3Qv2wZbJA2N4wQZyQG5F4/vw+ZZU4bslukFSK7TNZS xxRw1IZO560DhSeGmta+18G8k9UrQLG6v9PLuvtIAzpIfdeKI49q7lfkl6TaIdQzSJ AwGD7NvD6gb5A0JqWZaIAewbVhp2sE1L+aeHvD/yUn8mrWYwrEE0++rRzbVnwzZwnl PbFWddyGcJ/52+2c6CevUJRGj/V4qNbFu39N/ZOH+fQFDLAYpk4c5siHOX6QFOU99e Mm6cVy/xqOUS1xBVJy3t/sYvs7PYEaUv0DeAPUKSwXkiz49wA5UKCqm/YJmVKxiAAP +OFiCePFaTVGA== From: Mark Brown To: perex@perex.cz, Meng Tang , lgirdwood@gmail.com, tiwai@suse.com Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org In-Reply-To: <20220302094351.3487-1-tangmeng@uniontech.com> References: <20220302094351.3487-1-tangmeng@uniontech.com> Subject: Re: [PATCH] ASoC: hdac_hda: Avoid unexpected match when pcm_name is "Analog" Message-Id: <164631439115.1870788.3267235264627671548.b4-ty@kernel.org> Date: Thu, 03 Mar 2022 13:33:11 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 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 Wed, 2 Mar 2022 17:43:51 +0800, Meng Tang wrote: > pcm name can be "Analog" and "Alt Analog", cpcm->name can be > "Analog Codec DAI" and "Alt Analog Codec DAI". When pcm_name > is "Analog", "Analog Codec DAI" and "Alt Analog Codec DAI" are > both satisfy the 'if (strstr(cpcm->name, pcm_name))' condition, > which may cause the returned cpcm to be "Alt Analog Codec DAI". > > Even if we get the pcm name by id, and "Analog Codec DAI" goes > into the loop before "Alt Analog Codec DAI", but I still think > we'd better have multiple insurances against unexpected return > values. After, we can correctly return the expected result > even if other relevant places are changed. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: hdac_hda: Avoid unexpected match when pcm_name is "Analog" commit: e94769900f4302b4034945e5d9ec8262a2f5e086 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