Re: [PATCH v2] RDMA/core: Fix race when resolving IP address

2019-07-09 Thread Jason Gunthorpe
On Fri, Jul 05, 2019 at 07:09:50AM +0300, Leon Romanovsky wrote: > On Fri, Jul 05, 2019 at 07:49:06AM +0530, Parav Pandit wrote: > > On Fri, Jun 28, 2019 at 2:20 PM Dag Moxnes wrote: > > > > > > Use neighbour lock when copying MAC address from neighbour data struct > > > in dst_fetch_ha. > > > > >

Re: [PATCH v2] RDMA/core: Fix race when resolving IP address

2019-07-05 Thread Dag Moxnes
Den 05.07.2019 04:19, skrev Parav Pandit: On Fri, Jun 28, 2019 at 2:20 PM Dag Moxnes wrote: Use neighbour lock when copying MAC address from neighbour data struct in dst_fetch_ha. When not using the lock, it is possible for the function to race with neigh_update, causing it to copy an invali

Re: [PATCH v2] RDMA/core: Fix race when resolving IP address

2019-07-04 Thread Leon Romanovsky
On Fri, Jul 05, 2019 at 07:49:06AM +0530, Parav Pandit wrote: > On Fri, Jun 28, 2019 at 2:20 PM Dag Moxnes wrote: > > > > Use neighbour lock when copying MAC address from neighbour data struct > > in dst_fetch_ha. > > > > When not using the lock, it is possible for the function to race with > > ne

Re: [PATCH v2] RDMA/core: Fix race when resolving IP address

2019-07-04 Thread Parav Pandit
On Fri, Jun 28, 2019 at 2:20 PM Dag Moxnes wrote: > > Use neighbour lock when copying MAC address from neighbour data struct > in dst_fetch_ha. > > When not using the lock, it is possible for the function to race with > neigh_update, causing it to copy an invalid MAC address. > > It is possible to

[PATCH v2] RDMA/core: Fix race when resolving IP address

2019-06-28 Thread Dag Moxnes
Use neighbour lock when copying MAC address from neighbour data struct in dst_fetch_ha. When not using the lock, it is possible for the function to race with neigh_update, causing it to copy an invalid MAC address. It is possible to provoke this error by calling rdma_resolve_addr in a tight loop,