Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8127692imu; Tue, 4 Dec 2018 03:29:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/XEOwog3ebhpR+uEz41hfRq8MLOrROHjAYRyt7s8dnttwv5tSp9Ak0NOUwqMozEIRECAc2d X-Received: by 2002:a17:902:1005:: with SMTP id b5mr19803593pla.310.1543922960874; Tue, 04 Dec 2018 03:29:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543922960; cv=none; d=google.com; s=arc-20160816; b=t7jPU68WbLEoMWm2dTSG3Fk9dQzqkE5TBzwog49EsbKtFqPE7uW8ticgKMzN0gSv+X O1Cj2GOougFrLzzzd3tfiZaZFa4uWRuMzybXbZRuPbQC7msGOvvMmi/fh6zDo0VeOuXQ Qv6kZt3lkvXXoRDlOAOQ/wRrjLaGbzoz/mN166cy6EWGFbSRTA76fbn0CdBAURQG+2MI fmtAxHNDs7cb1hA9nvNPeAYgXpeaJmeofT3TNTxn/PiA0ETzcex9RwjH0d3P3xcC1PTY cSM3kCpAH0RoqkQjkjNpcCRJwf2Gj+nt+HRL699k1hHCpZk1ukfuWkJjxOoAI4aFWdqZ Q68g== 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=0qJ3wR5E/al1R8kZOrG0FxNB/02wbLyGwHhp/sT5GNw=; b=TNoVKXkoiE+K29v2jNZzPC8yzJIuC+iEqyKir/0sCAhsjQ2yx3/7VgZiDZQTNQINVP AIkZC74K1gseqSynfKUv/UdOrg2zQWjWZUNIov8bhLrPxT1nu/h8o7obwOs78ofOY/b1 ULSsdUOXCB7YSJ/W4AAh3xaphuMWH/vfP6WKGN19FZ6+iK92u4zogw+xUbWk5yqeXfag M4BNB0FrC1/Ld+J3T7ZifpFjXU9BOdLogNJ3DdW/dzjYSzo9KdkMrljqlrJ06fipJ/Rr NaUFM+7CGauqnPCfyb0X09GgmDmm3kPA9GW8EU64vHElEoWbaKdlrFSVjZlETBsH3T5J OJcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H7/kVel3"; 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 u8si999210plh.385.2018.12.04.03.29.06; Tue, 04 Dec 2018 03:29: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="H7/kVel3"; 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 S1726917AbeLDL2d (ORCPT + 99 others); Tue, 4 Dec 2018 06:28:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:43226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbeLDK6k (ORCPT ); Tue, 4 Dec 2018 05:58:40 -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 4FD68214E0; Tue, 4 Dec 2018 10:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921119; bh=cMWE5cRHvyCGg9ZddyCNjw3tIRpQAlqgFfRttOOTukc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7/kVel3S4yXuGnX1Fb9ZTIe3h6yR990D6aw7+axmLNjkuwCfIxGK2D5pU/RA3D/X azZturAHNk2wJp1WTmJnRGxaU2EkYX8T9TUBFJ1VZczK9Kp2BfjbvYehybLS9AI54Z j8EZ6kUcOcVvxDMO1FHtaeLPDDrZTI34JK1l9jtI= 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.19 089/139] ALSA: wss: Fix invalid snd_free_pages() at error path Date: Tue, 4 Dec 2018 11:49:30 +0100 Message-Id: <20181204103653.992735764@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@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.19-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;