Eric Dumazet 35d9b0c906 llc: fix a device refcount imbalance
Le dimanche 05 décembre 2010 à 12:23 +0100, Eric Dumazet a écrit :
> Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :
>
> > Hmm..
> >
> > If somebody can explain why RTNL is held in arp_ioctl() (and therefore
> > in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
> > that your patch can be applied.
> >
> > Right now it is not good, because RTNL wont be necessarly held when you
> > are going to call arp_invalidate() ?
>
> While doing this analysis, I found a refcount bug in llc, I'll send a
> patch for net-2.6

Oh well, of course I must first fix the bug in net-2.6, and wait David
pull the fix in net-next-2.6 before sending this rcu conversion.

Note: this patch should be sent to stable teams (2.6.34 and up)

[PATCH net-2.6] llc: fix a device refcount imbalance

commit abf9d537fea225 (llc: add support for SO_BINDTODEVICE) added one
refcount imbalance in llc_ui_bind(), because dev_getbyhwaddr() doesnt
take a reference on device, while dev_get_by_index() does.

Fix this using RCU locking. And since an RCU conversion will be done for
2.6.38 for dev_getbyhwaddr(), put the rcu_read_lock/unlock exactly at
their final place.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: stable@kernel.org
Cc: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-08 09:58:44 -08:00
..
2010-10-25 13:09:44 -07:00
2010-10-25 13:09:43 -07:00
2010-11-12 14:07:14 -08:00
2010-12-06 09:29:43 -08:00
2010-11-28 11:29:27 -08:00
2010-11-24 11:51:47 -08:00
2010-09-23 14:33:39 -07:00
2010-10-21 15:44:13 +02:00
2010-09-23 14:33:39 -07:00
2010-12-08 09:58:44 -08:00
2010-04-20 16:37:13 -07:00
2010-11-10 12:12:00 -08:00
2010-10-29 04:16:28 -04:00
2010-11-29 09:45:15 -08:00
2010-08-09 11:25:17 +02:00
2010-10-15 15:53:27 +02:00