Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp899210imu; Tue, 11 Dec 2018 09:15:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/UoZxh+W4MRLNcsi45LAMqNJgzYmMdl+v17MYa9i9evTy3aWQnj7hvtDJowZbQx7QC1KKHb X-Received: by 2002:a63:588:: with SMTP id 130mr15106169pgf.273.1544548520561; Tue, 11 Dec 2018 09:15:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544548520; cv=none; d=google.com; s=arc-20160816; b=IezFulZTgY9ywAmExVq/clH/NX+g0ZYNPNnXm63TTT+DiSK3YfQnOR3UffSBzVc+gE H5zcjhrhhqKr+8olBxy6Xwf5Effv0GN0NeO532rvMF5chqHILv1B6aQccXvxFCIjUNAB LJqXjVnb99BL/oN8uGdGI6qLHsXeX4nRGDEYfTXGM5PzllCAM85NhtW8MKnX3JMjqdyk 8pHy5QJ2KiItHXmYgaANcmnGqlx6viT4yZuNtit+lhzLOL5k/2mKsJ1sdxrNXuER6hJ7 0V1qz1h4F9aopIrJGfc1XweYx+ODt69WKSwD3LYcAowEjzmaSTIdOh5ZYNOsFbeXy/rH PoKg== 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=eWfUoyisDuDdGDsWRmiOOALcdp0G8NBk8XLcAvJZxCA=; b=C5/Up/Cbd/lB9eH+wS2mtCXELOsJTLM2CpJ34MThxQMGyl+EEmZYikyd3FZXX349w9 t6gkr7mkN7iHEM6NM0g2QrQMKb1GunWhqudXqQtqac3pWFz+21bqqdNmR04F/CCnIHwF O2CoL/rDB1ueSJcNlXyeZsznnCNnMa/hT5evH1vfPgfipX9s7qtEzttq3o66/A5pAURL aKTP2DimsF5jzpUnA0zQExoBXZv6S39eUrHSw+ct/7OjhzlPglxZk3STmxXB9VAsd12d +HyzsoWbFkSKkI0W054MxzwtlNYprP7SL17IfuslBe1NaBq/mye+7gvluZ3FJ3HmZK49 UMyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D4yhnKy2; 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 r11si12294564pgg.327.2018.12.11.09.15.05; Tue, 11 Dec 2018 09:15:20 -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=D4yhnKy2; 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 S1727304AbeLKPmk (ORCPT + 99 others); Tue, 11 Dec 2018 10:42:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:59012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727291AbeLKPmj (ORCPT ); Tue, 11 Dec 2018 10:42:39 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 10D1120672; Tue, 11 Dec 2018 15:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544542958; bh=aq39aArnhCLGGHBTpMfz/Kxiky2ZQX/pCEycvZWLTzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D4yhnKy2QAFkmBPe45wPH/KtWMklv9Kf8WRvFV8m4kaGzulMAtsvv7VH/pa7uz/te FfCv8ftnrrzp9Yv9kiiUA7ukFUtumcLS0Tir5zkDgvTYaDDg53miOfEn32ktO07O71 mdROD2OcN5TpLoPfwwn/60+ylAxu2bk2zWvQ6k8E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai Subject: [PATCH 3.18 05/54] ALSA: wss: Fix invalid snd_free_pages() at error path Date: Tue, 11 Dec 2018 16:40:53 +0100 Message-Id: <20181211151546.295773949@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 7b69154171b407844c273ab4c10b5f0ddcd6aa29 upstream. Some spurious calls of snd_free_pages() have been overlooked and remain in the error paths of wss driver code. Since runtime->dma_area is managed by the PCM core helper, we shouldn't release manually. Drop the superfluous calls. Reviewed-by: Takashi Sakamoto Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/isa/wss/wss_lib.c | 2 -- 1 file changed, 2 deletions(-) --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1531,7 +1531,6 @@ static int snd_wss_playback_open(struct if (err < 0) { if (chip->release_dma) chip->release_dma(chip, chip->dma_private_data, chip->dma1); - snd_free_pages(runtime->dma_area, runtime->dma_bytes); return err; } chip->playback_substream = substream; @@ -1572,7 +1571,6 @@ static int snd_wss_capture_open(struct s if (err < 0) { if (chip->release_dma) chip->release_dma(chip, chip->dma_private_data, chip->dma2); - snd_free_pages(runtime->dma_area, runtime->dma_bytes); return err; } chip->capture_substream = substream;