[ofa-general] Re: IB/ipoib: Fix neigh destructor oops for kernels older than 2.6.21

Alexey Kuznetsov kuznet at ms2.inr.ac.ru
Wed May 14 08:30:00 PDT 2008


Hello!

On Wed, May 14, 2008 at 04:40:12PM +0300, Or Gerlitz wrote:
> Eli Cohen wrote:
> >I add to the thread the author of the commit. I don't know this code
> >good enough to give an explanation but for kernels following this commit
> >I don't get these failures. Perhaps someone else can comment on this.
> >
> Even before understanding what Alexy's patch is doing, can you explain 
> why the ipoib neighbour destructor callback is called after the ipoib 
> module has been unloaded? is it b/c the stack did this call on a 
> neighbour created by another device such as loopack etc?

Look at thread "Subject: dst_ifdown breaks infiniband?" in netdev or lkml.


Shortly, the problem is the following:

* To unload a netdevice we must release all the references.
* Particularly, we force release of the neighbour references,
  redirecting stale neighbour entries to loopback device
* However, neighbour destructor still points to ipoib device and it is called
  after the device is unloaded (since we dropped reference, unload is possible)

The observation was that destructor is the only harmful thing
and that actually it is not used by anyone but ipoib.

The patch get rids of destructor and introduces cleanup, which is made once
for each neighbour entry before invalidation (particularly, right before
the device is unregistered) and it is supposed to move neighbour entry
to the state, where we do not need any calls to the device code.

Alexey




More information about the general mailing list