Re: [PATCH] PCI/P2PDMA: Annotate RCU dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
> ---

I believe that this change removes the warning is question.

With that said, looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux