again unregister_netdevice and fix?

From: Tihomir Heidelberg (rsdf.tfccm@cm246-246.liwest.at)
Date: Tue Apr 02 2002 - 11:05:36 EEST

  • Next message: Thomas Sailer: "Re: solution for usermode soundmodem ptt problem"

    Hi

    I still have "kernel: unregister_netdevice: waiting for ??? to become free.
    Usage count = ???" problem when shutting down linux box at 9a0tcp gateway,
    but this does not happand at several other machines.
    All are using kernel 2.4.18.

    I looked in kernel source and found that in linux-2.4.18/net/core/dev.c
    kernel call notifier function with NETDEV_UNREGISTER message to devices.
    But ax25, netrom and rose do not handle that message, just NETDEV_UP and
    NETDEV_DOWN. I added to af_ax25.c, af_netrom.c and af_rose.c to handle
    also NETDEV_UNREGISTER the same way as NETDEV_DOWN and the problem is gone.
    Here is source I modified:

            switch (event) {
                    case NETDEV_UP:
                            ax25_dev_device_up(dev);
                            break;
    + case NETDEV_UNREGISTER:
                    case NETDEV_DOWN:
                            ax25_kill_by_device(dev);
                            ax25_rt_device_down(dev);
                            ax25_dev_device_down(dev);
                            break;
                    default:
                            break;
            }

    As I see all other protocols handle NETDEV_UNREGISTER, is this a problem
    that we have in ax25 for 2.4.x kernels ?

    What is exactly the difference between NETDEV_DOWN and NETDEV_UNREGISTER
    and where I can find some documentation about those stuffs ?

    73 de Tihomir Heidelberg, kxfmi@broadviewmedia.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-hams" in
    the body of a message to jnhmif@catv296.ne.jp
    More majordomo info at http://vger.kernel.org/majordomo-info.html



    This archive was generated by hypermail 2b30 : Tue Apr 02 2002 - 11:05:36 EEST