Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2022127imu; Fri, 14 Dec 2018 04:39:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/WSxd3Zu1DWewspqk5t7C00yEBlhnC4Oa7pp8SvJq9zqDvzfjPAJbVmPKUJhig3jxJ5Wo0X X-Received: by 2002:a63:c451:: with SMTP id m17mr587230pgg.27.1544791141069; Fri, 14 Dec 2018 04:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791141; cv=none; d=google.com; s=arc-20160816; b=b+0ZFWRFCar7qluz5PzSVdQcAeRCVWvXivNITDM2lRTaZjPVI7XznkExdw6GhmzSbw LB4g1AXQQvM8Wa/PXDePrz+JyUEfuv5MHlW+4l3R2TJyuRl3iLNfzZ2otNjJYk0DjY5D 1qMRhxMDg0BowU7K0fix0bNNB94aM4Cv4c+O7q9V7rnZcbqKl2gxwZZUTIJX8KfP5qNc IXPDt9P1KepjCTzwrcG4tMmc4BxiFknF4VlBVSNopHsHnVHlV7NfF/FDl31qJ37BcCrN bnneswtEY56mw4ZbYN5VHIMjfli8P+qxEXx9kwDsUT7RGRDZ4e3T1XxUAL8aYwkBry2C gDnA== 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=qn2u4wGFq/OEzUs9/wCYAswKGSzPlfoib9NXgHI868w=; b=izzFpZp5DjHy3xUg3PuKU/Rqrv3ijdy6FNejX4OSc3Smpj/jrUjuocgHHpG0NLr+R7 gCkx4S7jov6Xsy+rFPocJERWv78UocWjutjebZrFl6w0EV/IUdlkmeYCEux685o9IWvt OzDxnjHMUk/RouQhshcNRRsSJWT+wmKc+ocCSRKkENnvhBWvVK6WhSio81Z8K9pU8A/w qvAnlvRFg5auGqDNvruu+QevjrRGvpk6XdL+BuD900KSA8PO0i5Ig+kDtQTlKOWk5VDx 0mWRhozi2t/274/IE8omBj+lDw20gJRw3idWqHNw3NyfmbUvMsGOR2NmEW/fiD3UIp7Q PDHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ot2WpeyW; 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 11si4037140pgs.126.2018.12.14.04.38.46; Fri, 14 Dec 2018 04:39:01 -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=Ot2WpeyW; 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 S1730834AbeLNMGB (ORCPT + 99 others); Fri, 14 Dec 2018 07:06:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:50840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730014AbeLNMFy (ORCPT ); Fri, 14 Dec 2018 07:05:54 -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 977D321479; Fri, 14 Dec 2018 12:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789154; bh=QpCMsYTivLaW4dLSMxIrEd+94J0u+CmZAEnHoy3LzuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ot2WpeyWpsPrPFAVbtGX6ihv0E5pKPlK6jNuIw6PT68Nal7/40TzwPy7kwLlguVSy gmzi11p/eFoNzzAUDcvHNoCyDM/zeVbMeGCjYqfGAF+BJX9WOuZSPLv0/7QzEGboE2 9OhiNl6FLKhgfJTT88AoHU0z9ylVqVk3+lnAiAhc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pan Bian , Stefano Stabellini , Juergen Gross , Sasha Levin Subject: [PATCH 4.19 114/142] pvcalls-front: fixes incorrect error handling Date: Fri, 14 Dec 2018 12:59:59 +0100 Message-Id: <20181214115751.600882293@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 975ef94a0284648fb0137bd5e949b18cef604e33 ] kfree() is incorrectly used to release the pages allocated by __get_free_page() and __get_free_pages(). Use the matching deallocators i.e., free_page() and free_pages(), respectively. Signed-off-by: Pan Bian Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross Signed-off-by: Sasha Levin --- drivers/xen/pvcalls-front.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index 2f11ca72a281..77224d8f3e6f 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -385,8 +385,8 @@ static int create_active(struct sock_mapping *map, int *evtchn) out_error: if (*evtchn >= 0) xenbus_free_evtchn(pvcalls_front_dev, *evtchn); - kfree(map->active.data.in); - kfree(map->active.ring); + free_pages((unsigned long)map->active.data.in, PVCALLS_RING_ORDER); + free_page((unsigned long)map->active.ring); return ret; } -- 2.19.1