Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353196pxb; Mon, 20 Sep 2021 19:51:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY9CFQpT6ya7AQp/oLcu0nqVrPLQaSoMz7HTHgQH49Iq2ZJ+X4w1sysiMNBlc/yOf40GY/ X-Received: by 2002:a17:906:7716:: with SMTP id q22mr32896604ejm.457.1632192667140; Mon, 20 Sep 2021 19:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192667; cv=none; d=google.com; s=arc-20160816; b=TkzO1z7jcAc8v3FZJW64UCpWpwKheBFFLLsekQ+QZzWjWEHTtOfSmrBFCap8SCA34V 1RNxr0SAY9SqQ5HzVEXSfHERgQF906Yb69RTxMGzTvu3GeKhLxOHO4vQ06UpTeBkupwR UQL0L2AskX9bFfqgGqmCxwoYzOUbowzYDJRWrBLPx4A9jn3RFhQ+N02jZFCr7+Rn5wh6 gbpnvSRdAk9/j0cScoEq5lzJifi3VB3NkmKKOwY4MqMb/DII1NVyWzn7YzvZuBsrD6n+ VlwHSSwisNQXo7QJFcnTyCBkB2INPqFg+wSq0SKWGl7oOervv0xWzY9Qp4+xALA+NoXa l4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hKUYJh30GOVf98jkfWgfT24Vu8icuh5+anEheHE1z+U=; b=AUM86Ss8lbOZYciDrg84mWmy11ItBC3avx5cZkUagOJY9F3vB1wVS1Kqejcgw+Ld1o THmpBx85ICM69k7AZACKrJF2WNK8vEdeNj55fOJ7MEMPg2KGhnBJR2nvGtKNUGNrbc3q TvH7XWRLf+93p7mPzvN5cUbxnZad1IwzUsrt5+2gfobpoUQfpcxy0uANL0LKvM9rWxss xb42mK3EG4/Ncui/7+R/EfejR66SkDh4W4VGyv+mEwiGxOcQx1vIQphiVDebAELCNCqP pGSj/yy0YjaqVM+6eeOWGLshf7oe7rBkeKWpYlDiCdaVCDf1VHwXS2mDmSOifJrRPINc eeXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EIWIuLeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f30si280246edj.24.2021.09.20.19.50.44; Mon, 20 Sep 2021 19:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EIWIuLeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349671AbhITSlx (ORCPT + 99 others); Mon, 20 Sep 2021 14:41:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381244AbhITShB (ORCPT ); Mon, 20 Sep 2021 14:37:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 554EC63313; Mon, 20 Sep 2021 17:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158976; bh=f6D9i/fpwHzNTa4IRWLZh6SapM96QDsmr4fwG9XetUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EIWIuLeTNAX2KR+mLKA4Y2UbLB+lnDPd4oUDeW4wHRegfc7yhvzy2C+yTe8UqDwio TEQvDQOHpB73T/7MUGvO0gBqpzGqUQNBFnpSZImkbd+aiYkymQ7o3/wr6yK0BYl9yi 7aYOKTFxQZ3VANUPpkuY3hVtDgN199AncWnnqPTc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Beulich , Christoph Hellwig , Juergen Gross Subject: [PATCH 5.14 002/168] swiotlb-xen: avoid double free Date: Mon, 20 Sep 2021 18:42:20 +0200 Message-Id: <20210920163921.724284878@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Beulich commit ce6a80d1b2f923b1839655a1cda786293feaa085 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/xen/swiotlb-xen.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -216,7 +216,6 @@ error: goto retry; } pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc); - free_pages((unsigned long)start, order); return rc; }