Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1475C64EC4 for ; Fri, 3 Mar 2023 13:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbjCCNbN (ORCPT ); Fri, 3 Mar 2023 08:31:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbjCCNbL (ORCPT ); Fri, 3 Mar 2023 08:31:11 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBD075FEB4 for ; Fri, 3 Mar 2023 05:31:05 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4481422CE3; Fri, 3 Mar 2023 13:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1677850264; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mlk2c5lF7C4OPG+stf2dODO36SSn7fXvACl7CLuEjvE=; b=P7y2YFWzZCuqQaZuSttdPPX5WBUX8rJgvtZF/gUKN+vNc1mtcL3GnhxXFIVQbuFBZ1TgPB UK9/1Bitl0higUnE2NolhCwa03wnIgQuHTBWBSyqidD/QuBJ7dq5JwYdZhNe9YQQn7NSoJ vnyZbOHMnMZddzO3DIv29HwlGKkb0bg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1677850264; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mlk2c5lF7C4OPG+stf2dODO36SSn7fXvACl7CLuEjvE=; b=87jJ8e4lyz9vNP2cUx33I4RrKdSjApoU/BGM4LqJKPLd8Z4z8EMhgsuvqAQh7szpT14WHs BUjqCegPQKlvwiDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1E1AC1329E; Fri, 3 Mar 2023 13:31:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zXd8Bpj2AWT4dwAAMHmgww (envelope-from ); Fri, 03 Mar 2023 13:31:04 +0000 Date: Fri, 03 Mar 2023 14:31:03 +0100 Message-ID: <87y1oermg8.wl-tiwai@suse.de> From: Takashi Iwai To: Dmitry Fomin Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH 1/2] ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() In-Reply-To: <20230225184322.6286-1-fomindmitriyfoma@mail.ru> References: <20230225184322.6286-1-fomindmitriyfoma@mail.ru> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 25 Feb 2023 19:43:21 +0100, Dmitry Fomin wrote: > > If snd_ctl_add() fails in aureon_add_controls(), it immediately returns > and leaves ice->gpio_mutex locked. ice->gpio_mutex locks in > snd_ice1712_save_gpio_status and unlocks in > snd_ice1712_restore_gpio_status(ice). > > It seems that the mutex is required only for aureon_cs8415_get(), > so snd_ice1712_restore_gpio_status(ice) can be placed > just after that. Compile tested only. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Dmitry Fomin Applied both patches now. Thanks. Takashi