Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2025446imu; Fri, 14 Dec 2018 04:42:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/XtMcL0OYR/Yq7iT0ZtDvkeFN8daI5uVTb/SZpc4EIXyF4UWVMVveCnjZcs1LtQlyQg5g9C X-Received: by 2002:a62:46d0:: with SMTP id o77mr2754114pfi.172.1544791343776; Fri, 14 Dec 2018 04:42:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791343; cv=none; d=google.com; s=arc-20160816; b=QJONdlLWFgb1iJfBYIoHr2uw8fVsK51CLTrOUSuIWA0bTX357q/YFT8wXiyhIg3wwD OlxHnxiL9p5q3TUx9lWghJW8cJpzHoMhHsMHW1PzC1YlpyALigPn0nFCHcGNkD9I/ykr hLbwPFHR0bAISua6mZks4QE4OS/YonLbH/K6k1alB7bb8esb/Nsh22AR9qQTz0hrlmfS jHJCavgsbS3Hbw2A0YSOYtRTJMObrZaXf+ugPTUiLAc7VSKLDYIb2zxJeyJQLYWuMjYm 9/0KAOsiiPrd+Z3/ohAvRh+/dnCbbpAk1qa3MPgjuzoxuF9X4ANJ4giPI1qj9q4ONr4B iGwg== 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=Eyn6JObcuZwtOR6yFN6p8Tnq3V0Dbxt5p8quLGHGJsE=; b=Yl9ZQYFyWuh81h+iu3YVZTQMUmiiQH9iO7Bb5uBUEIOLmrDHnKcILzUKiQvQzZZszH I+owMOxYBrRX74qk4RtiFS+JPNo0yXTUPvA7nDx09etJJSpTs7VObT2ByINVOAP0M9W7 ymsoT5xjBwjaRqT7P5sLZyTuQ74BTx7/G6WUXInqFicrGffglMVzYVEAEyBfsCKWGpbS rs12MqhZukBXZ+p36Hb7nOigw89DIMZn7Htcdo89BeJxlcr6ruB2dPUE5f0r2Os2NVGU x4h3wFK7ITqw88e67QM9N7p7cEO8cAR7CHkB1fn+T9L5nhsse3ujNtkfCzNYBiLtEgkH MhQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i5W3kA6w; 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 j5si4175479pfg.254.2018.12.14.04.42.09; Fri, 14 Dec 2018 04:42:23 -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=i5W3kA6w; 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 S1730339AbeLNMDj (ORCPT + 99 others); Fri, 14 Dec 2018 07:03:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:47542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729775AbeLNMDh (ORCPT ); Fri, 14 Dec 2018 07:03:37 -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 5CF352145D; Fri, 14 Dec 2018 12:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789016; bh=ekwwVQBVJdzEm/3Q/5fC1Iu/yowF31+HLNgWHZefEWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i5W3kA6woHadQVSfut90kwehTo+ZK0nPL5kWKr8BsfcTk1xhUeT8j5cKQu52764db Q2CpIqZpmNOf8Em9SwAur5CXa9xIGgDlOUpkvb/4qhris89k/EMsWVOWwYlgKlWQ+d fw4582pNHjo0D9nL0bgUbLmKCKr9ZmO0GnlGdAhs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Farman , Halil Pasic , Cornelia Huck , Sasha Levin Subject: [PATCH 4.19 044/142] s390/cio: Fix cleanup of pfn_array alloc failure Date: Fri, 14 Dec 2018 12:58:49 +0100 Message-Id: <20181214115748.811441563@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@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. ------------------ [ Upstream commit 806212f91c874b24cf9eb4a9f180323671b6c5ed ] If pfn_array_alloc fails somehow, we need to release the pfn_array_table that was malloc'd earlier. Signed-off-by: Eric Farman Message-Id: <20181109023937.96105-2-farman@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck Signed-off-by: Sasha Levin --- drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c index fd77e46eb3b2..ef5ab45d94b3 100644 --- a/drivers/s390/cio/vfio_ccw_cp.c +++ b/drivers/s390/cio/vfio_ccw_cp.c @@ -528,7 +528,7 @@ static int ccwchain_fetch_direct(struct ccwchain *chain, ret = pfn_array_alloc_pin(pat->pat_pa, cp->mdev, ccw->cda, ccw->count); if (ret < 0) - goto out_init; + goto out_unpin; /* Translate this direct ccw to a idal ccw. */ idaws = kcalloc(ret, sizeof(*idaws), GFP_DMA | GFP_KERNEL); -- 2.19.1