• Michael Ellerman's avatar
    [PATCH] iseries_veth: Use kobjects to track lifecycle of connection structs · f0c129ca
    Michael Ellerman authored
    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: default avatarMichael Ellerman <michael@ellerman.id.au>
    Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    f0c129ca
iseries_veth.c 37.6 KB