Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1753840rdb; Mon, 8 Jan 2024 09:07:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0n/QgdKsRGG8kP7AmhmjPk6BPv1teIGDDiBqScyQCUwBKn0S8HtuGwLU+u69skL2zW1f+ X-Received: by 2002:a17:90a:656:b0:28c:e29b:cb69 with SMTP id q22-20020a17090a065600b0028ce29bcb69mr1309175pje.27.1704733626591; Mon, 08 Jan 2024 09:07:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704733626; cv=none; d=google.com; s=arc-20160816; b=rFtsVaUhTyFL6mdOzOiTc/pVh2mRGmKkp858tp0W1zt7966A2Gxab5EWhNEH/LOs2a UdBS/m/wN+ORT+tTZs53sBV3jfK3geDNXbibktRu9HJzq5LNuWH2shrG1Wej2M9Xnbex ieSKhtcdgkd585cfLZGSm4caGwsNgcba4UndHGolJMrKzNy6Fq9GMwJ8w5eRv6glT7P5 BKihF3bOJfkfJnPgn8zw1FbTG+aybzDXpYUDwdhCU6xT71RHiN3pjJsLZnxT2HiB96p9 g8RlYbP73sVA7TsHAIVsob1Wqz8ma8+7SoWXd74IFHnNf522MJEOGQT1BFw0JGA1maY5 bUrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=C1Ef31O31nzrvP3gO4AwdsDoSjCJFzgQXcEDSpepfVk=; fh=4VK5F4jG1Bzhlw/LOkUMBlLurqs40YL+TBZHUfwMrBc=; b=aQUKUae/s8vTyDVzGf7cnqXVSMlZ9Ee2HWYHj4uF4iHbAR9Zn4sMPGbUEW6mFo3Ycc SD1Ji273Es0Q06lPS45OQ5mSdjtPvqQ6KE012DXRFWeUCNspl4LGADyw9GNSYdXn316K dpSvEIMhchpz8t7pWxHfUTTOLP0Jke31vaMKodP4LCJn/ECkI4DZMdmddWYY7C+1OW2C qMER0+e0ChaklAhhQIXfh6kuNLAMNOMI7qqWuiyTbug6CVJl8MryDlASMQWJj0p9fPeC Ua8+5VOjs0Dm3XzyppQ5kTAPBR/Kw18E04cqUBrQoNt8YuAyWyBgdWX45BoKeZiinYpZ 7sUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19878-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a5-20020a17090a8c0500b0028cbf77f0cesi5961832pjo.102.2024.01.08.09.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 09:07:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19878-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D23D1B21A13 for ; Mon, 8 Jan 2024 17:07:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 670665465C; Mon, 8 Jan 2024 17:06:56 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FB4753E3E for ; Mon, 8 Jan 2024 17:06:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 9C17D68BFE; Mon, 8 Jan 2024 18:06:49 +0100 (CET) Date: Mon, 8 Jan 2024 18:06:49 +0100 From: Christoph Hellwig To: Peng Zhang Cc: hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, petr.tesarik1@huawei-partners.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, sunnanyong@huawei.com Subject: Re: [PATCH] swiotlb: check alloc_size before the allocation of a new memory pool Message-ID: <20240108170649.GA11047@lst.de> References: <20240108140005.3355316-1-zhangpeng362@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240108140005.3355316-1-zhangpeng362@huawei.com> User-Agent: Mutt/1.5.17 (2007-11-01) This looks good, but the surrounding code changed quite a bit in the dma-mapping code. Can you redo it against dma-mapping for-next (which should get merged into Linus' tree ASAP as I already sent the pull request)