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

2019-07-08 Thread Jason Gunthorpe
On Mon, Jul 08, 2019 at 10:11:29PM +0200, Dag Moxnes wrote: > > > Den 08.07.2019 21:38, skrev Jason Gunthorpe: > > On Mon, Jul 08, 2019 at 07:22:45PM +, Mark Bloch wrote: > > > > > > On 7/8/19 11:47 AM, Dag Moxnes wrote: > > > > Thanks Jason, > > > > > > > > Regards, > > > > Dag > > > > >

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

2019-07-08 Thread Dag Moxnes
Den 08.07.2019 21:38, skrev Jason Gunthorpe: On Mon, Jul 08, 2019 at 07:22:45PM +, Mark Bloch wrote: On 7/8/19 11:47 AM, Dag Moxnes wrote: Thanks Jason, Regards, Dag Den 08.07.2019 19:50, skrev Jason Gunthorpe: On Mon, Jul 08, 2019 at 01:16:24PM +0200, Dag Moxnes wrote: Use neighbou

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

2019-07-08 Thread Jason Gunthorpe
On Mon, Jul 08, 2019 at 07:22:45PM +, Mark Bloch wrote: > > > On 7/8/19 11:47 AM, Dag Moxnes wrote: > > Thanks Jason, > > > > Regards, > > Dag > > > > Den 08.07.2019 19:50, skrev Jason Gunthorpe: > >> On Mon, Jul 08, 2019 at 01:16:24PM +0200, Dag Moxnes wrote: > >>> Use neighbour lock when

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

2019-07-08 Thread Mark Bloch
On 7/8/19 11:47 AM, Dag Moxnes wrote: > Thanks Jason, > > Regards, > Dag > > Den 08.07.2019 19:50, skrev Jason Gunthorpe: >> On Mon, Jul 08, 2019 at 01:16:24PM +0200, Dag Moxnes wrote: >>> Use neighbour lock when copying MAC address from neighbour data struct >>> in dst_fetch_ha. >>> >>> When n

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

2019-07-08 Thread Dag Moxnes
Thanks Jason, Regards, Dag Den 08.07.2019 19:50, skrev Jason Gunthorpe: On Mon, Jul 08, 2019 at 01:16:24PM +0200, 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 nei

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

2019-07-08 Thread Jason Gunthorpe
On Mon, Jul 08, 2019 at 01:16:24PM +0200, 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 po

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

2019-07-08 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,