On Wed, May 18, 2011 at 06:00:35PM +0800, Amerigo Wang wrote:...
- case NETDEV_GOING_DOWN:This wasn't introduced by this patch, but looking at it made me realize that
case NETDEV_BONDING_DESLAVE:
+ case NETDEV_ENSLAVE:
nt->enabled = 0;
stopped = true;
break;
nt->enabled, if it passes through this code path, doesn't properly track weather
or not netpoll_setup has been called on this interface. If you look at
drop_netconsole_target, you'll see we only call netpoll_cleanup_target if
nt->enabled is set. We should probably change the nt->enabled check there, and
in store_enabled to be if (nt->np.dev), like we do in the NETDEV_UNREGISTER case
in netconsole_netdev_event.
+#define NETDEV_ENSLAVE 0x0014Nit:
Shouldn't this be NETDEV_BONDING_ENSLAVE, to keep it in line with
NETDEV_BONDING_DESLAVE above?
#define SYS_DOWN 0x0001 /* Notify of system down */
#define SYS_RESTART SYS_DOWN
Other than those two points, this looks good to me