Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6539006ybx; Mon, 11 Nov 2019 10:36:25 -0800 (PST) X-Google-Smtp-Source: APXvYqwVE2cC7WVCYoc0SqL8SSZ4hrybPxyjWDj39aP1pJz9xWqQc7oZNP0AoTQdfirdg5yxu1jb X-Received: by 2002:a17:906:524b:: with SMTP id y11mr23680720ejm.82.1573497385460; Mon, 11 Nov 2019 10:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573497385; cv=none; d=google.com; s=arc-20160816; b=tHx/9Ss4JqfiSo4JUIdxNCbPrM/qHoHQwLl48PxdO011p9QgaZC6K/zRTL5/b+WowB sSKLPK6r21iWXscHpEosPrp81MqM9cGMJPOpYQxYJfeoX5WezBW03FXWrOHo2N/8mAxH 28eC+Xeoj3d6rLhsHVb4oiyIZ4Z9ob9KXXS3aHkTArGxa9yExn7YglV51G42TXoQ6P5O 2vnoQoQ+WUM6K+8atGQMZ+FrW1by5qdmH2FTxCdvzGdlvUq7chpUawbIpNUD7CM6txPP HHTcsOyM/2syU6cbkSwP+pi+grRKhAkbqiN9A/f9EJ5727PR+t4jiqLUKHdsTRYr0fFT 9hFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kqIJ9ZctqaW6vcqYttf7xlJ98WeYhijDDUSpJGXDVS8=; b=guWlxRwkX3qHfpUlejTSMsYF/w0nPVlmlOPRxMWMyt1bdiqOvloEUzILZfnNA+YbtI jparQB/59pnHU2w8Z0wzUOBTcyT8DeZR9UxgI+/Qf6fNKICRA9LdoZwDJqgpZrR1IB2P hvE9OEmNgoRRsHPylx2BGsGLLMFASo2D6+SYmQxwn2vUJQVB1p2UdJkR9CYdjyXgfT7r 6YcYZiti6gjg7RilB6PVE5lC7Z+iJgNarPZqCO2q+5HnZoQHMhnuyKiWnBJttRXJyvJA jGturdbCnVXEVFAmvJqgDgfOZC11k52j1cM2dGW4BzhNwL127QsEkKLRH66XOWOIEc48 Pjpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2dFJP9a2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si11738522edu.135.2019.11.11.10.36.01; Mon, 11 Nov 2019 10:36:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2dFJP9a2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728237AbfKKSd4 (ORCPT + 99 others); Mon, 11 Nov 2019 13:33:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:51382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728229AbfKKSdy (ORCPT ); Mon, 11 Nov 2019 13:33:54 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 789A821783; Mon, 11 Nov 2019 18:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497234; bh=O8JqrFNL5fiRfUfBZHt8d/7Bp/awQ18JHCgSuhlLIGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2dFJP9a22FQ6OqdD+Gffc5LKriyARm+6U+Le6Sap0q2wzg9P2tI9csP2HtfVeNJdi BxmlzRG3GWqWKzqXnIk3FXFXBU7pa6Z8hPmaUEsahJvobEQyDoQBgwUDIyGgSkPSIt FmSvPPcsSfAB4u83a56MUt90P6RQ5UAeTVM8Hh4I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.9 11/65] ALSA: hda/ca0132 - Fix possible workqueue stall Date: Mon, 11 Nov 2019 19:28:11 +0100 Message-Id: <20191111181342.533517089@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181331.917659011@linuxfoundation.org> References: <20191111181331.917659011@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 15c2b3cc09a31620914955cb2a89c277c18ee999 upstream. The unsolicited event handler for the headphone jack on CA0132 codec driver tries to reschedule the another delayed work with cancel_delayed_work_sync(). It's no good idea, unfortunately, especially after we changed the work queue to the standard global one; this may lead to a stall because both works are using the same global queue. Fix it by dropping the _sync but does call cancel_delayed_work() instead. Fixes: 993884f6a26c ("ALSA: hda/ca0132 - Delay HP amp turnon.") BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1155836 Cc: Link: https://lore.kernel.org/r/20191105134316.19294-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_ca0132.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -4440,7 +4440,7 @@ static void hp_callback(struct hda_codec /* Delay enabling the HP amp, to let the mic-detection * state machine run. */ - cancel_delayed_work_sync(&spec->unsol_hp_work); + cancel_delayed_work(&spec->unsol_hp_work); schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500)); tbl = snd_hda_jack_tbl_get(codec, cb->nid); if (tbl)