]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] iseries_veth: Use kobjects to track lifecycle of connection structs
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 1 Sep 2005 01:29:09 +0000 (11:29 +1000)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Sep 2005 02:39:43 +0000 (22:39 -0400)
commitcdac8dadff8b605a6759e502779ca1fd85a8724d
tree84f22d680065e39d11be61ecd992d6b8597704dd
parentb071cbf66f493cfa7e7716b4c179884fa3453386
[PATCH] iseries_veth: Use kobjects to track lifecycle of connection structs

The iseries_veth driver can attach to multiple vlans, which correspond to
multiple net devices. However there is only 1 connection between each LPAR,
so the connection structure may be shared by multiple net devices.

This makes module removal messy, because we can't deallocate the connections
until we know there are no net devices still using them. The solution is to
use ref counts on the connections, so we can delete them (actually stop) as
soon as the ref count hits zero.

This patch fixes (part of) a bug we were seeing with IPv6 sending probes to
a dead LPAR, which would then hang us forever due to leftover skbs.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/iseries_veth.c