Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3478918yba; Tue, 7 May 2019 01:46:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgfMNx3cBM6tOjomNA5jYAypqp4o14h7y4pLezdeK1AO7jOcKYROB69PQ/e6ZY4IHy2eA7 X-Received: by 2002:aa7:91cb:: with SMTP id z11mr41026601pfa.64.1557218768149; Tue, 07 May 2019 01:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557218768; cv=none; d=google.com; s=arc-20160816; b=I1BFgqpSMrEi97oMeiau0VBGWJ4lFzqlSNfYDGi6Sh0OT6nqF4BwN/oLK0HS5KG9Rj trVyWX8ZjuXwLEqyDZqxzodvlwnTHFQn0wU/Fr2UnXAwnXlDDPKec3bvUgf9UwRbUn13 GzgB3dBPwhfPa96rZMX5IgkC6icJHnOb1JzWfBf1yox7boeI67961N0FZB4yv9jS36I2 M0t7UXNWzdW0PrQzC5O9hHSnp/Z6mZbI/IXeZdHoyU/g/razKo/2FahCoUjqj5NfD0am X71KKMK7yFWaq6BeLg45AsWaYcNRYRKVSqf6WpNv1r6fG3bKTUSRvq7w8ugbzAcFQZp/ YbUQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=qP0ccFgtPkJJKA2rg98nO5wwA/5fCaXJnLnCzOPI8ck=; b=WwHtK1RbGrVT2MoO84h+QkJBefkGpcdF3DQI2tIBYyp6PNSeQcFaxxDiIC2eCzd5sB ja3a+NVLUi1cbzvFY3HJjNUWMaXYCRBXigc6xdC5uvIxEhdLPJ+AQ6DF/2qnNZo9jiL+ RTXQATKnYmsNJZa94sRY0eK51qeP0DQt7ZsaQxty/pXluSypFqJQ5QXevSbPdWfTcop+ Sc+hV/MADQXCrIfyD01OioIaGYanLLneFavgtcT9SFlCWVMIrVkN/UHRWjDF9+OVwplc eOOjN5E80dw47H41I7Sudvc4Ek7eO0NfHe42U+N2jGQf9bYp5tq6YALTq7Dw0sMufNoK 2cgg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si17402305pfh.244.2019.05.07.01.45.51; Tue, 07 May 2019 01:46:08 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfEGIoq (ORCPT + 99 others); Tue, 7 May 2019 04:44:46 -0400 Received: from mo-csw1515.securemx.jp ([210.130.202.154]:52174 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbfEGIop (ORCPT ); Tue, 7 May 2019 04:44:45 -0400 Received: by mo-csw.securemx.jp (mx-mo-csw1515) id x478iZX5032021; Tue, 7 May 2019 17:44:35 +0900 X-Iguazu-Qid: 34trdEsBYeq0nk84MX X-Iguazu-QSIG: v=2; s=0; t=1557218675; q=34trdEsBYeq0nk84MX; m=v4RU/QN3+eLWzfyeYzcWxU1KH8L8IUhV6/7htfKnXoQ= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1511) id x478iY1r031159; Tue, 7 May 2019 17:44:35 +0900 Received: from enc01.localdomain ([106.186.93.100]) by imx2.toshiba.co.jp with ESMTP id x478iYUR008098; Tue, 7 May 2019 17:44:34 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.localdomain with ESMTP id x478iYkv030958; Tue, 7 May 2019 17:44:34 +0900 Date: Tue, 7 May 2019 17:44:30 +0900 From: Nobuhiro Iwamatsu To: Greg Kroah-Hartman Cc: , , Charles Keepax , Mark Brown Subject: Re: [PATCH 4.19 79/99] ASoC: wm_adsp: Correct handling of compressed streams that restart X-TSB-HOP: ON Message-ID: <20190507174430.2e981704@fdyp522> In-Reply-To: <20190506143101.240836871@linuxfoundation.org> References: <20190506143053.899356316@linuxfoundation.org> <20190506143101.240836871@linuxfoundation.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, May 06, 2019 at 04:32:52PM +0200, Greg Kroah-Hartman wrote: > From: Charles Keepax > > commit 639e5eb3c7d67e407f2a71fccd95323751398f6f upstream. > > Previously support was added to allow streams to be stopped and > started again without the DSP being power cycled and this was done > by clearing the buffer state in trigger start. Another supported > use-case is using the DSP for a trigger event then opening the > compressed stream later to receive the audio, unfortunately clearing > the buffer state in trigger start destroys the data received > from such a trigger. Correct this issue by moving the call to > wm_adsp_buffer_clear to be in trigger stop instead. > > Fixes: 61fc060c40e6 ("ASoC: wm_adsp: Support streams which can start/stop with DSP active") > Signed-off-by: Charles Keepax > Signed-off-by: Mark Brown > Signed-off-by: Greg Kroah-Hartman This commit has other problems, and it is fixed by commit 43d147be5738a9ed6cfb25c285ac50d6dd5793be. Please apply this commit too. commit 43d147be5738a9ed6cfb25c285ac50d6dd5793be Author: Charles Keepax Date: Tue Apr 2 13:49:14 2019 +0100 ASoC: wm_adsp: Check for buffer in trigger stop Trigger stop can be called in situations where trigger start failed and as such it can't be assumed the buffer is already attached to the compressed stream or a NULL pointer may be dereferenced. Fixes: 639e5eb3c7d6 ("ASoC: wm_adsp: Correct handling of compressed streams that restart") Signed-off-by: Charles Keepax Signed-off-by: Mark Brown Best regards, Nobuhiro