[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220623132800.GA9262@lst.de>
Date: Thu, 23 Jun 2022 15:28:00 +0200
From: Christoph Hellwig <hch@....de>
To: Dexuan Cui <decui@...rosoft.com>
Cc: Christoph Hellwig <hch@....de>,
"m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
"robin.murphy@....com" <robin.murphy@....com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
Andrea Parri <Andrea.Parri@...rosoft.com>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>
Subject: Re: [PATCH] dma-direct: use the correct size for
dma_set_encrypted()
On Thu, Jun 23, 2022 at 07:00:58AM +0000, Dexuan Cui wrote:
> It looks like commit 4a37f3dd9a831 fixed a different issue?
>
> Here my patch is for the latest mainline:
>
> In dma_direct_alloc()'s error handling path, we pass 'size' to dma_set_encrypted():
> out_encrypt_pages:
> if (dma_set_encrypted(dev, page_address(page), size))
>
> However, in dma_direct_free(), we pass ' 1 << page_order ' to dma_set_encrypted().
> I think the ' 1 << page_order' is incorrect and it should be 'size' as well?
Indeed. I've applied the patch now.
Powered by blists - more mailing lists