• Hiroaki SHIMODA's avatar
    dummy: Add ndo_uninit(). · 890fdf2a
    Hiroaki SHIMODA authored
    In register_netdevice(), when ndo_init() is successful and later
    some error occurred, ndo_uninit() will be called.
    So dummy deivce is desirable to implement ndo_uninit() method
    to free percpu stats for this case.
    And, ndo_uninit() is also called along with dev->destructor() when
    device is unregistered, so in order to prevent dev->dstats from
    being freed twice, dev->destructor is modified to free_netdev().
    Signed-off-by: default avatarHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    890fdf2a
dummy.c 4.9 KB