[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FCB9C443-0A57-4E8D-AF13-A61F80861A4F@svenpeter.dev>
Date: Tue, 26 Apr 2022 22:22:05 +0200
From: "Sven Peter" <sven@...npeter.dev>
To: "Yang Yingliang" <yangyingliang@...wei.com>
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
will@...nel.org, joro@...tes.org, alyssa@...enzweig.io
Subject: Re: [PATCH] iommu/dart: check return value after calling
platform_get_resource()
> On 25. Apr 2022, at 10:56, Yang Yingliang <yangyingliang@...wei.com> 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>
Reviewed-by: Sven Peter <sven@...npeter.dev>
Thanks,
Sven
Powered by blists - more mailing lists