Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6575080ybx; Mon, 11 Nov 2019 11:11:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxheGw9sYZtrKEn8m4HjNy7npclQ7+I4wsmRdUre7k2bpr4YFXcTpYKMSRnxinlIJYWtt67 X-Received: by 2002:aa7:cd52:: with SMTP id v18mr28231830edw.280.1573499501767; Mon, 11 Nov 2019 11:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573499501; cv=none; d=google.com; s=arc-20160816; b=Dv4YsTlxXXbaepLS5OAOE6iki/I3tYjJ8yF20jp3Cof8WCGMmTEILqeu88OdKLdyp7 EsnnCvs+8I/N5iwXyUDurJtXz10Aai4R9s4j0miN9RflmcTmCgf4EKF+82NPYFD7pavj safvuQ4s41fGDR8r5UsfdDLoJ3wl0tEJ2kMWl+Kq9Dx/yieBXLqH9eYl3FrRp3fxzy/8 6yHhGwl7+sO5WxjLQZvzQhmtcnnMzJu/cWwY03W8iluPKSG5NXiLsHdf7pDANA+dcAnH E5lpO5mxkNOs6tQRZiOS2Cdzd5pDUpbCUO4aBC5ICAHWMVWHKetaW/7v7+svmvz+SxTY oogg== 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=j/Z9aAxb8PQhtMixbDJ377sAFGKXg4BUwbX1iWccM/B6hYIn5pDDJbHPvtHBEb/ErE fkMQRufLPT+3Xe6jOZEFVdKdQ0+FOE1IZSM3ByJj0IhHFjXtSYVW+yL/0AyTEMT6aVAg qj+5JKQrJYzwW2spnv/Fbhe/IalhrUqwZ+F4kFP1RMPLZIhLtSvLEPS2+rBRAQcYGWCG eEzEmQ8mVYVnfDKr1gEv4a+abuHejK/lbJ4KlpHVhhYdBOkiTQEMlpP8tWP9mneT/lJu DqXf04drcfqV3HzrwC+5jmpMyG92/rltLAFyAr8QnfRwMG5vM4OIWsGu1ikJ+ZiXQnxi RUWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SuLXTfTS; 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 o1si9484896eje.298.2019.11.11.11.11.17; Mon, 11 Nov 2019 11:11:41 -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=SuLXTfTS; 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 S1726952AbfKKSfX (ORCPT + 99 others); Mon, 11 Nov 2019 13:35:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:53244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728503AbfKKSfW (ORCPT ); Mon, 11 Nov 2019 13:35:22 -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 474592173B; Mon, 11 Nov 2019 18:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497321; bh=O8JqrFNL5fiRfUfBZHt8d/7Bp/awQ18JHCgSuhlLIGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SuLXTfTSXiffYgm4TxU7JMtisgdfhbi2Pt/gr4XjE7gDSv6hffq07dYeQ2GhBwyR8 qsxbhR+CI3tBRdNgOYmS625cNkDL+7ILiup8xdZvwi36ptmXaPk8pvcpV5NXi7/VaJ q2Oudxu4WW/BoplzXgqG2sQuCAcTwe/Dmuplsz3E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.14 014/105] ALSA: hda/ca0132 - Fix possible workqueue stall Date: Mon, 11 Nov 2019 19:27:44 +0100 Message-Id: <20191111181430.867150113@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181421.390326245@linuxfoundation.org> References: <20191111181421.390326245@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)