[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0d780e8-03b5-f2f2-6b3e-49794628dea5@nvidia.com>
Date: Thu, 9 Feb 2023 17:53:22 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Logan Gunthorpe <logang@...tatee.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
CC: kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] PCI/P2PDMA: Annotate RCU dereference
On 2/9/23 09:29, Logan Gunthorpe wrote:
> A dereference of the __rcu pointer was noticed by sparse:
>
> drivers/pci/p2pdma.c:199:44: sparse: sparse: dereference of noderef expression
>
> The __rcu pointer should be dereferenced using
> rcu_dereference_protected() instead of accessed directly. Its safe
> to use rcu_derference_protected() seeing a reference is held on
> the pgmap's percpu reference counter and thus it cannot disappear.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
> ---
I believe that this change removes the warning is question.
With that said, looks good.
Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>
-ck
Powered by blists - more mailing lists