[ofa-general] Re: dst_ifdown breaks infiniband?
Michael S. Tsirkin
mst at dev.mellanox.co.il
Sun Mar 18 22:15:20 PDT 2007
> Quoting Michael S. Tsirkin <mst at dev.mellanox.co.il>:
> Subject: Re: dst_ifdown breaks infiniband?
>
> > Quoting Michael S. Tsirkin <mst at dev.mellanox.co.il>:
> > Subject: Re: dst_ifdown breaks infiniband?
> >
> > > Quoting Michael S. Tsirkin <mst at dev.mellanox.co.il>:
> > > Subject: Re: dst_ifdown breaks infiniband?
> > >
> > > Quoting Alexey Kuznetsov <kuznet at ms2.inr.ac.ru>:
> > > Subject: Re: dst_ifdown breaks infiniband?
> > > > > Can dst->neighbour be changed to point to NULL instead, and the neighbour
> > > > > released?
> > > >
> > > > It should be cleared and we should be sure it will not be destroyed
> > > > before quiescent state.
> > > >
> > > > Seems, this is the only correct solution, but to do this we have
> > > > to audit all the places where dst->neighbour is dereferenced for
> > > > RCU safety.
> > > >
> > > > Actually, it is very good you caught this eventually, the bug was
> > > > so _disgusting_ that it was "forgotten" all the time, waiting for
> > > > someone who will point out that the king is naked. :-)
> > >
> > > Actually that might not be too bad:
> > > $grep -rIi 'dst->neighbour' net/ | wc -l
> > > 36
> > >
> > > I'll try to do it.
> >
> > Here's the list. Looks OK to me. What do you think?
> >
>
> So Alexey, how does the following (lightly tested) patch look?
> Is this what you had in mind?
>
> -----------------------------
>
> Fix dst_ifdown for infiniband.
>
> Changing dst->neighbour->dev is unsafe because neigh->parms callbacks
> are set up for specific device.
> We should drop the dst->neighbour reference instead.
>
> Signed-off-by: Michael S. Tsirkin <mst at dev.mellanox.co.il>
Ugh, looked again and this looks obviously broken.
Note to self - stop writing code at 23:00.
--
MST
More information about the general
mailing list