Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1847659pxb; Fri, 10 Sep 2021 15:56:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTBRxNM8GaQolCxsIVhnw7g/HwOtdU+/3Jwzn7m34H/KWu3zxBpzl5eFD06kEuBij1nCy2 X-Received: by 2002:a92:6605:: with SMTP id a5mr22595ilc.17.1631314560261; Fri, 10 Sep 2021 15:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631314560; cv=none; d=google.com; s=arc-20160816; b=lSCVI1UGFQbaxYgw21yz7Z2KwyGDhlIbB8RpYDlI8gUFu5a7eGEwp5o0S2hTjUcubg SCtux+Z16mU6XhW1NDp+01+OZ7SxwoDlipoRRM4moxlGg3/sukyHKs0hp/dvh6Trbnl7 LUL1o074jAV0qT3eQDtbc/iFCI8MhRbJrqJ1dPpThuNBjtp3DZSM4jF6y7vLH9l6jvTr ATgDhWIjvIymjXKpFVARY9sXhpxiq74GjDXXkIre9+PwsuLJrzCynDZRV3Pi4MNVldeg PRG0HHa9XWSanhmn+LC0d+JW+VQxNH95GlhQi+c42JJwZWdXNrBj/LEvL1ZI2BndH3gG GDGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ygoxx6Pfpkv9Nx/HnnXvqNIqbO+3JFWKOu3QR2OSFDo=; b=DveGuZXxDtcRNO4iV7kFtUhQQxoXwc4MfsYXDqRK37NdjMz9HyFxn0AChfrAvXz9sz 0LTlxm7q/AzrOJ2ZUsVEnWf9aNvwcm0df+vR2vZmziChh7YQ6steMBRmf9oUkRAMvILD Hrzk6PYSllOS6ErflEpLLh3lz1zDKzOfI8HiF5sV2efr1veqDSOEqpVs+uoy54XOQWEb lHUSp4/SyGT5wkcv9ulh5yJ5JfMmdU6NxrPoottbyXmciDCtLv0Eb7ESD3s7jw/zmBa7 MzCzixWXSoerRw5HAzKOo07AHr++ZhHGY8/f2BOU51v/ZsG2Qy51O9+ZjtidBN4vItv3 Kp2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WkQpk6kZ; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si5637362ilg.114.2021.09.10.15.55.48; Fri, 10 Sep 2021 15:56:00 -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=@kernel.org header.s=k20201202 header.b=WkQpk6kZ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232491AbhIJW4U (ORCPT + 99 others); Fri, 10 Sep 2021 18:56:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbhIJW4T (ORCPT ); Fri, 10 Sep 2021 18:56:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BEE1C611AD; Fri, 10 Sep 2021 22:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631314507; bh=VJ5ipnbbr7/hh4BSPRAZdwAh7k+W87MfA9moLBnzp0s=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=WkQpk6kZbm/ZHT+FsrAzCBeXuYhUISywAxkP9plMEH2n2yyeze9UKk7QZTjhgDLXN 51ugguyIEa/+V8LllhC/PNyCzFILxyuwld5PTQB2gF4M9FfA5EJt7JAcq3fUkXc44z RjLXp9WELfVVxbNKwIxQ+1Fn2mq3NPHvUxZC/cf6KQkGWTHozf5VM/7/PVvDpAxYv0 zQx4Vfyar5oZnFDNHBNymesr4CjJu1q1T9D1vPA995FUeYqCST0KdgOrc2bd+G/sP+ xlo2BLhCiOi7UGnuyGemVt7DQkI2HbKUIPvBywaJNaw14X2oT5UAyJCJ2CdShrDZ2Z ZUniSmG/6PxxA== Date: Fri, 10 Sep 2021 15:55:06 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Jan Beulich cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH 01/12] swiotlb-xen: avoid double free In-Reply-To: Message-ID: References: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Sep 2021, Jan Beulich wrote: > 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: Stefano Stabellini > --- 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; > } > >