Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6554238ybx; Mon, 11 Nov 2019 10:51:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxk+6PwH66OBUXW9vmLoElfhuC9X5MoYoF8F0s5O+cakTM3KWll8Mt+3FIqXSwqCG64j3mA X-Received: by 2002:a50:d713:: with SMTP id t19mr28313871edi.185.1573498317923; Mon, 11 Nov 2019 10:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573498317; cv=none; d=google.com; s=arc-20160816; b=kN3jqflAI+t6beb68uiSePykdVwtD6EWMNJQrFP+zHUkR5D/1g9EoPszXT60ShaTiJ zEuqhSII6movFAYx6Owq/4zaJ0oqJ3hV6W+pcvtKOaHpmJK4GYWma2BaKBk9mpm7sffR jmjn+P3bNVWbTy4eorjUM14KrhR3Nnb5XyldSMsz3GJcLfuo84d/+ulij+dIsqPsnzlj NiC8vG9V4Dw6zzBQA4YdnCcliOINOyplb7NUpOpEX0yqPL/DEWT539eZZ2qJoCuJ2yvv wzk2DAp+gFkC0OwXtecuYBruKg3kKbI91iyithjLQZR0Yxr4us3EltopAqFfzjZE2IPy KVUA== 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=7eruErp00/6K7ghIdWVwvqFu8+ICkvkOe99LlV7CFos=; b=wLktO5kRbbtfIut/tOnIjzp+Vv7h+xIAvZwc80D+oSzLdKRKXwedCRSiCTBpft8XWN MF5O22bpUocmrFVivyLkYLqQOGu8ZWroPn6CsWFq6BHAbjI7r6jbK8RY7q2ISMSdt3kC lJFyCvh5CW126bFZSUjefg6D3a1+8Z6T/U4xlBg3xKD1ei70UtBbO6mclFklVI6d9GSF y6Gxy5Ta1WWgsYvhV8vfu9aXdjbZcw+UFpajmIHIATUN4LvSMhfFQZtpgJnhK2ygnjuL Z8oP7OqWuf71wUHEyM3Rmu4bmhK0mCnlhLzgr8D6QB28c9QcuVZdb6CPZlSW88qAy8z+ idnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jbXwt5Am; 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 f8si11588553edf.428.2019.11.11.10.51.34; Mon, 11 Nov 2019 10:51:57 -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=jbXwt5Am; 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 S1729782AbfKKSu6 (ORCPT + 99 others); Mon, 11 Nov 2019 13:50:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:44846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730028AbfKKSuz (ORCPT ); Mon, 11 Nov 2019 13:50:55 -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 C21C521655; Mon, 11 Nov 2019 18:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573498254; bh=rkmLoaAJO0IPfco4Q0wQ7qYtCDweohjA2q8aZ0sOLSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jbXwt5AmtkFPigaBkH47TecOalkpuYJNPJuUIUONnjUy7JDf2pmrepzOKMg0M/8sB sCm5tXnQvCSvEdF+9qzm86Y5CQzyfvtWv/wkVydJQULFRqaA1ChdZgOR6lbDOp+/+j lxEcXvy+UvkiCoDfuYgI0yh8FTckkkxRH/I+QYms= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.3 027/193] ALSA: hda/ca0132 - Fix possible workqueue stall Date: Mon, 11 Nov 2019 19:26:49 +0100 Message-Id: <20191111181502.260219355@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181459.850623879@linuxfoundation.org> References: <20191111181459.850623879@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 @@ -7604,7 +7604,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)