Re: [PATCH rdma-next 7/7] RDMA/core: Allow detaching gid attribute netdevice for RoCE

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

 



On Wed, May 01, 2019 at 05:36:17AM +0000, Leon Romanovsky wrote:
> On Wed, Apr 10, 2019 at 02:24:36PM +0000, Leon Romanovsky wrote:
> > On Wed, Apr 10, 2019 at 11:18:57AM -0300, Jason Gunthorpe wrote:
> > > On Wed, Apr 10, 2019 at 02:13:03PM +0000, Parav Pandit wrote:
> > >
> > > > > Parav,
> > > > >
> > > > > Boot with rcu_dereference produces the following warning.
> > > > >
> > > > > [    7.921247] mlx5_core 0000:00:0c.0: firmware version: 3.10.9999
> > > > > [    7.921730] mlx5_core 0000:00:0c.0: 0.000 Gb/s available PCIe bandwidth
> > > > > (Unknown speed x255 link)
> > > > > [    8.299897] mlx5_ib: Mellanox Connect-IB Infiniband driver v5.0-0
> > > > > [    8.307859]
> > > > > [    8.307989] =============================
> > > > > [    8.308084] WARNING: suspicious RCU usage
> > > > > [    8.308193] 5.1.0-rc2+ #278 Not tainted
> > > > > [    8.308302] -----------------------------
> > > > > [    8.308446] drivers/infiniband/core/cache.c:302 suspicious
> > > > > rcu_dereference_check() usage!
> > > > >
> > > > > >
> > > > Yes. So lets do
> > > >
> > > > rcu_dereference_protected(attr->ndev, 1);
> > > >
> > > > with below updated comment?
> > > >
> > > > +	/* rcu_dereference is not needed because GID attr being passed as input during
> > > > +	 *  GID addition cannot change. It is used only to avoid smatch complain.
> > > > +	 */
> > >
> > > Why cannot it change?
> > >
> > > You don't need to talk about smatch, the use of
> > > rcu_dereference_protected is self-explanatory.
> >
> > While you are discussing the best comment, I tried it and it worked.
> >
> > Jason, do I need to resend v2?
> 
> Jason?

Sure otherwise it will get forgotton..

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux