Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp799216imu; Tue, 11 Dec 2018 07:46:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/XNpI2k6wvzb51z+jVln0wkrdwvnH2w2LAo0WZV8dyIAsVoBryCAf+BRsLRPs5JZLM8JsGH X-Received: by 2002:a62:2547:: with SMTP id l68mr16560945pfl.131.1544543206444; Tue, 11 Dec 2018 07:46:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544543206; cv=none; d=google.com; s=arc-20160816; b=lGKKX3bcUqwTbAJVDEtblMKuchGqgZsOaRVUYM8WdWQ8gC+znY6zypHALZXonqL3rm bUjBTwy64zzuwfGM9Xug2nBqNJ9PwePtxPzheqxJiGy275hi/oaexkfxOL78hK7M1+EW xbIn6E2jHQhgiyxAV9nhlhQxBr7ZvnLeM/4WwTnVcPifpXE4oGOMoOU8bM1S6eoVg+OQ 0qo1ieov7gCHxKlE82fQn0afz3K18hjMkf884IuDaVPM0XYt3N3doZ8ZH9aaAM6WdWxX G3wh9rzr4SeZ2ccLkur/zxn2XgDiqaoC8DObvkogLQBfZC1T+h6lq5gpRn1L1MhdqWFj q33Q== 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=CHs6mVWkL/47No7Qwl3DisyoqiM2zUM4Jlc5bqwdRIs=; b=pa+F4Nr+MvkPhmT757qSzatTYMLTyc5iwlqW9zopoxy9qAw7t7vsjikcnHJfrte7QS aYfBGfZxoxv5zkdQI1JSGzdPtHbRuqTG9OvsGKZREq8SzMQ673XlYA5FCldabQOliBck pzQmxIzjuFoVyG480DqP8xPSxZA2cvCFi50ogE9oB7K0U1c+hAaTvn5OiDX6IrCSdET8 bzHVPsNOWXoROXv/OfWnpT151dQec4CL8wzDeRJYg2uOeycjsF8kavO47tTLyDLm/efV HXXF2lnGa+N1X3OlHuIljhz3TXWpeqfmPo04uEe+RZW4Ad5OJ8IVjb4KggoaVbdL2PES Iglw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F+UUHLRS; 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 k33si13175574pld.374.2018.12.11.07.46.31; Tue, 11 Dec 2018 07:46:46 -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=F+UUHLRS; 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 S1727963AbeLKPoy (ORCPT + 99 others); Tue, 11 Dec 2018 10:44:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:33272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbeLKPox (ORCPT ); Tue, 11 Dec 2018 10:44:53 -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 5E81520855; Tue, 11 Dec 2018 15:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543092; bh=P/ivg5PXU7MAOGQG7v1JvQNF6SCE/SOUjZtQHSNBphs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+UUHLRS308o+2aHnrNVm8lWJzVpsHS0fRjgg44G6vni6lSANP35PpfIUwBZoWz+w 2C13fQEHV/2VgGfcSSP0Se+W7LVAkToHbBmce7Zx6qjsJpvC+8JXjPLmhsdalQ+ewR d+bPy/iEE2cpoSCUwfDntwateVWcrav49pfIOsKc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai Subject: [PATCH 4.4 10/91] ALSA: wss: Fix invalid snd_free_pages() at error path Date: Tue, 11 Dec 2018 16:40:29 +0100 Message-Id: <20181211151606.789781174@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@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 4.4-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;