[ofa-general] Re: [PATCH net-2.6.24] Fix refcounting problem with netif_rx_reschedule()

David Miller davem at davemloft.net
Tue Sep 18 13:15:05 PDT 2007


From: Roland Dreier <rdreier at cisco.com>
Date: Tue, 18 Sep 2007 10:58:37 -0700

> netif_rx_complete() takes a netdev parameter and does dev_put() on
> that netdev, so netif_rx_reschedule() needs to also take a netdev
> parameter and do dev_hold() on it to avoid reference counts from
> getting becoming negative because of unbalanced dev_put()s.
> 
> This should fix the problem reported by Krishna Kumar
> <krkumar2 at in.ibm.com> with IPoIB waiting forever for netdev refcounts
> to become 0 during module unload.
> 
> Signed-off-by: Roland Dreier <rolandd at cisco.com>

Applied to net-2.6.24, thanks Roland.

> BTW, it looks like drivers/net/ibm_emac/ibm_emac_mal.c would not have 
> built in the current net-2.6.24 tree, since its call to
> netif_rx_reschedule() was left with the netdev parameter.  So that
> file does not need to be touched in this patch.

Yes, I know, this is the one NAPI driver that hasn't been converted.

It's a complicated conversion because of how the driver and the data
structures have been arranged (in short, a mess) which makes it
insanely difficult to get from a queue instance back up to a network
device or similar.

Further complicating things is that you need to setup a ppc32
cross-build environment to even build test a conversion, and I'm not
comfortable doing the surgery until I can test build the thing.

And this may be hard to believe, but other things have been more
pressing than setting up a ppc32 cross-build environment :-)

This is a hint of anyone looking for something to do that it'd
be much appreciated for someone to tackle the ibm_emac conversion.

Thanks.



More information about the general mailing list