From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E963CC433EF for ; Sat, 18 Sep 2021 12:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D005F6127B for ; Sat, 18 Sep 2021 12:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbhIRMWh (ORCPT ); Sat, 18 Sep 2021 08:22:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:51568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbhIRMWg (ORCPT ); Sat, 18 Sep 2021 08:22:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A817A61108; Sat, 18 Sep 2021 12:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631967673; bh=Cw6IdEtRbE5yEBoA0msCIctAoBYei4E2TFjHQkiIIks=; h=Subject:To:Cc:From:Date:From; b=ddQFvCz5B7WSGxz5yvLFDgW86E7Rdr9kOmvMllZF6JtlpvMU4z9RMphWBrKvCsHyy L/MSFps9EG9FAjojDXX38OpIXGQn2NIhOogjwxYj8l7gg5qUPN4hHhhcg2Cihn4R9K fJ5hpoeVuBcD0IWa6BaJrFYXTmrQaF9jxiexb7Ek= Subject: FAILED: patch "[PATCH] swiotlb-xen: avoid double free" failed to apply to 5.4-stable tree To: jbeulich@suse.com, hch@lst.de, jgross@suse.com Cc: From: Date: Sat, 18 Sep 2021 14:21:02 +0200 Message-ID: <163196766288108@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ce6a80d1b2f923b1839655a1cda786293feaa085 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 7 Sep 2021 14:04:25 +0200 Subject: [PATCH] swiotlb-xen: avoid double free Of the two paths leading to the "error" label in xen_swiotlb_init() one didn't allocate anything, while the other did already free what was allocated. Fixes: b82776005369 ("xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used") Signed-off-by: Jan Beulich Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/ce9c2adb-8a52-6293-982a-0d6ece943ac6@suse.com Signed-off-by: Juergen Gross diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 24d11861ac7d..99d518526eaf 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -216,7 +216,6 @@ int __ref xen_swiotlb_init(void) goto retry; } pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc); - free_pages((unsigned long)start, order); return rc; }