• Jakub Kicinski's avatar
    netpoll: allocate netdev tracker right away · 48eed027
    Jakub Kicinski authored
    Commit 5fa5ae60 ("netpoll: add net device refcount tracker to struct netpoll")
    was part of one of the initial netdev tracker introduction patches.
    It added an explicit netdev_tracker_alloc() for netpoll, presumably
    because the flow of the function is somewhat odd.
    After most of the core networking stack was converted to use
    the tracking hold() variants, netpoll's call to old dev_hold()
    stands out a bit.
    
    np is allocated by the caller and ready to use, we can use
    netdev_hold() here, even tho np->ndev will only be set to
    ndev inside __netpoll_setup().
    Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    48eed027
netpoll.c 19.3 KB