Received: by 10.223.176.46 with SMTP id f43csp901300wra; Wed, 24 Jan 2018 07:36:57 -0800 (PST) X-Google-Smtp-Source: AH8x227sQtOq0JhDjsYeDFi1jRo9q/1WoE2o70uCSEYpLbL5yZXfVYRv/30WibCAi97BxwyCXOL2 X-Received: by 2002:a17:902:6943:: with SMTP id k3-v6mr8388161plt.285.1516808216921; Wed, 24 Jan 2018 07:36:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516808216; cv=none; d=google.com; s=arc-20160816; b=bZJXmBW5H6KDAmyk8h4YiTMIG9qhUWns2ZvbmbRq8FVTAZjYCrKKrCeI2U8nEtLOsu Mnt2PbBh4hOTwVQrgXVmwc/1cspdpm/0St4owdsTs/yFVzsW3wNvZhVKuV0L+H5M62HC pyJO4V8M3spjk3gTmasFLprwqPYc5XGMn2nP/ZKNYUloEwmMOW7jG60maSdRlpsz7LBP syAPKhvWlMKCb5HD6ZR0oQq936CWa6rYRDHKHTaO7lY7W12tKmAYnpBOfhLnDaiiZ8g6 HR35hCN5RD0uPQdIlSVAPCQfbUbZ9DYv+X6DSqNLL2hZTLtp66ejat72jVlWN2Lsxtjo txSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=C4+g7XBBAI81OTz6PcyDysv0utVwc9Mu5GH4i2DMWUA=; b=MYKfsnkkE4CgH0inmnMXtHJVbVhfMy0YCvQ0o7osNcRW39g/TRzupD0AMnDlW0kJKo N7vlSzfEYPxEvmPKD3si4NeWorwh0bc66JDnIYE1liB4t7OWveNiiQ+V5zSZ1IPx0bdf 3h+iOCv/QvAkzg6ufgupWTgGp/nJczQWYL5S32Pivy6ZnieO6J60brTNX5zmGlUsW5Gh MYoZRiWaFnT9LFzGf77K2OK4vIIu2RW6pj0fOpOW//koQcNJn9nOzdxaUqsfKBuun6Xg b8joLJtxNhRLZqMWspTRpAqwtYSTUGtWkVHCsUXPOzdQ0K7gyoPLniCaLVaqrji7j41O H4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=r5EBZ2zM; 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 f80si3056737pfa.111.2018.01.24.07.36.42; Wed, 24 Jan 2018 07:36:56 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=r5EBZ2zM; 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 S934092AbeAXPgO (ORCPT + 99 others); Wed, 24 Jan 2018 10:36:14 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:49904 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933953AbeAXPgM (ORCPT ); Wed, 24 Jan 2018 10:36:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=C4+g7XBBAI81OTz6PcyDysv0utVwc9Mu5GH4i2DMWUA=; b=r5EBZ2zMFCfh iUMq0Eyl2tT9030p4/6ANH4qwwQEE0NAZ35N6z2JHoUqnaNf8PWlvuGiZnPWlI6mTPJlppRZZWuQk i+sIkFabSchIApatj1ynLxlhvLXQfSw5HCjtnX59q1LGXd6MCnSGR2BRKgsjhVpZ5wrqA4vhBY/Hx pC7aQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eeN5q-0004JZ-N8; Wed, 24 Jan 2018 15:36:06 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1eeN5q-0004lO-5c; Wed, 24 Jan 2018 15:36:06 +0000 From: Mark Brown To: Marc Zyngier Cc: Mark Brown , stable@vger.kernel.org, Oder Chiou , Bard Liao , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Brian Norris , Takashi Iwai , alsa-devel@alsa-project.org Subject: Applied "ASoC: rt5514-spi: Check the validity of drvdata pointer on resume" to the asoc tree In-Reply-To: <20171216011230.107527-1-briannorris@chromium.org> Message-Id: Date: Wed, 24 Jan 2018 15:36:06 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: rt5514-spi: Check the validity of drvdata pointer on resume has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 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 From 509bf3a7d43ab173abc354df2a859229ede043c0 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Wed, 24 Jan 2018 14:50:00 +0000 Subject: [PATCH] ASoC: rt5514-spi: Check the validity of drvdata pointer on resume The rt5514-spi driver seem to assume the validity of the drvdata pointer on resume, which it may not be populated, leading to a not-so-nice crash. This stems from the fact that rt5514_spi_pcm_probe() is never called on my system (a kevin Chromebook). No idea why, but if it can happen, it is worth fixing. Fixes: e9c50aa6bd39 ("ASoC: rt5514-spi: check irq status to schedule data copy in resume function") Signed-off-by: Marc Zyngier Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- sound/soc/codecs/rt5514-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c index 2df91db765ac..9255afcf2c3a 100644 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@ -482,7 +482,7 @@ static int __maybe_unused rt5514_resume(struct device *dev) if (device_may_wakeup(dev)) disable_irq_wake(irq); - if (rt5514_dsp->substream) { + if (rt5514_dsp && rt5514_dsp->substream) { rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, sizeof(buf)); if (buf[0] & RT5514_IRQ_STATUS_BIT) rt5514_schedule_copy(rt5514_dsp); -- 2.15.1