[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ympgt+2G8fXD1w5H@8bytes.org>
Date: Thu, 28 Apr 2022 11:39:03 +0200
From: Joerg Roedel <joro@...tes.org>
To: Yang Yingliang <yangyingliang@...wei.com>
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
will@...nel.org, alyssa@...enzweig.io, sven@...npeter.dev
Subject: Re: [PATCH] iommu/dart: check return value after calling
platform_get_resource()
On Mon, Apr 25, 2022 at 05:08:26PM +0800, Yang Yingliang wrote:
> It will cause null-ptr-deref in resource_size(), if platform_get_resource()
> returns NULL, move calling resource_size() after devm_ioremap_resource() that
> will check 'res' to avoid null-ptr-deref.
> And use devm_platform_get_and_ioremap_resource() to simplify code.
>
> Fixes: 46d1fb072e76 ("iommu/dart: Add DART iommu driver")
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/iommu/apple-dart.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
Applied to iommu/fixes, thanks.
Powered by blists - more mailing lists