Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp348981rwi; Tue, 18 Oct 2022 19:01:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7joXVFZJXNiDZ9/oPEBs6H7QW76U1ovM6yS4BozjATSnUxbr+0rjKOwqL6H2aIvHZbaLDA X-Received: by 2002:a17:907:6eac:b0:78d:ce9c:3761 with SMTP id sh44-20020a1709076eac00b0078dce9c3761mr4699846ejc.738.1666144899503; Tue, 18 Oct 2022 19:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666144899; cv=none; d=google.com; s=arc-20160816; b=FEJMhYgMQIHAyvEXUuxDLJL/PmViTLp5YhKHm70ZJ6hws6ZKEk9HWu8aieGbXw707s 9HxzTNhOdjbv+sqjN6oJm5q3wKEaR2+jaOd/j2l6nk8Oxcw6+t+bFXeCyNuE88Zz67HR bE6/K1Z0eTnJlrXL9U7Y2ZXdV2Vt6JWMjXBO1Gh9ddlwe28AycalePC3uC6zMuUW87Q2 PeyJ++d4mwYA+sLU5GSFDb/WtvUNwRkufnoAA/UhE66+Fdtr2yFrdoutKAzKOWycBymU PIW/4yEziwQmGQanIJl40lDWb07tM6jLrMytcXix8RJ5vhT+8HCNC/GToMB/J67N0cey hLpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=iZnOQQpZ3wy/qdmeMdYbwMWldNeSoMyRxGjCEBcW0ag=; b=NuXsu6pIRa6fEJw+y5VF8ZJCuXhfY6trYDtb7TD6sWvRBv2cRGuWqceKGzOctu+65f bL97ILRnad4pt6EZ/ypdPDLsabDMbc2m/uYKqSHW/+ViWjAxgyYteuS/KMg4R849YTw/ wSWfRsW6INjWi8U08gT+oAKd+wQv+igzMteD3JFjXg+Exe9gmE92wGfN/HXbrf+6y8mK Y/JD66jx1YKYZP5fIA9wl4eRCLq6HoCxfyNS1SICHnFeRNi8GFFMZTitfwF+7qTD/0lM Kj4E0YC7XT80nNr+iXwcKyURYkD8wM4j044+fqnQsZmwyWXti9pw1r2G498SLd8evNLT 1pkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ZE/U56Q5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce6-20020a170906b24600b0078de51ec509si11219162ejb.686.2022.10.18.19.01.12; Tue, 18 Oct 2022 19:01:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ZE/U56Q5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbiJSBAo (ORCPT + 99 others); Tue, 18 Oct 2022 21:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiJSBAm (ORCPT ); Tue, 18 Oct 2022 21:00:42 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C930CC823F for ; Tue, 18 Oct 2022 18:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666141241; x=1697677241; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=aDVSrblbxjUrl9rBex0zEUaGNmL3cagKEcM5NrBCtus=; b=ZE/U56Q5e8C1KldrGq/kbwQVClHZTtiidkOINXaxM8zCSsYLCF6ipd8q BPyAq6gvlAyZIw7ODMc9pS1D2pZRHcX1ePPvqdQGabzN7BrOTstYuxCs5 2WstApJ22ekdT+qkRtNAICodIb/2q5AsAhspR7MLfwfwuoxf0gFRk3wtY WXzEgNkMnFC108b44BE9LXKFgDb2D4B/zaZQhDwSvkFmWOZDtxmyWSleg QGJBVwDNTMVDrppIkoZkntRHL2V4Oo7ci2TZu/7NvIXgsdtU8OuI9elZe pPLSmsIsvfLEjTZMDnGUG45dqk1VQLgdn/yfj5iiEdlDMfLoipbqAbNYN A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="307960244" X-IronPort-AV: E=Sophos;i="5.95,194,1661842800"; d="scan'208";a="307960244" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 18:00:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="660079123" X-IronPort-AV: E=Sophos;i="5.95,194,1661842800"; d="scan'208";a="660079123" Received: from allen-box.sh.intel.com (HELO [10.239.159.48]) ([10.239.159.48]) by orsmga008.jf.intel.com with ESMTP; 18 Oct 2022 18:00:39 -0700 Message-ID: Date: Wed, 19 Oct 2022 08:54:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Will Deacon , Robin Murphy Subject: Re: [PATCH v2] iommu/vt-d: Clean up si_domain in the init_dmars() error path Content-Language: en-US To: Jerry Snitselaar , iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20221010065608.281860-1-jsnitsel@redhat.com> <20221010144842.308890-1-jsnitsel@redhat.com> From: Baolu Lu In-Reply-To: <20221010144842.308890-1-jsnitsel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/22 10:48 PM, Jerry Snitselaar wrote: > A splat from kmem_cache_destroy() was seen with a kernel prior to > commit ee2653bbe89d ("iommu/vt-d: Remove domain and devinfo mempool") > when there was a failure in init_dmars(), because the iommu_domain > cache still had objects. While the mempool code is now gone, there > still is a leak of the si_domain memory if init_dmars() fails. So > clean up si_domain in the init_dmars() error path. > > Cc: Lu Baolu > Cc: Joerg Roedel > Cc: Will Deacon > Cc: Robin Murphy > Fixes: 86080ccc223a ("iommu/vt-d: Allocate si_domain in init_dmars()") > Signed-off-by: Jerry Snitselaar Thanks for the patch. It has been queued for v6.1. https://lore.kernel.org/linux-iommu/20221019004447.4563-1-baolu.lu@linux.intel.com/ Best regards, baolu