Actions
Feature #3338
open140: register_netdev() must be paired with unregister_netdev(). alloc_netdev() must be paired with free_netdev().
Start date:
08/10/2012
Due date:
% Done:
0%
Estimated time:
Published in build:
Description
You mast call unregister_netdev() for already registered device, free_netdev() is not enough.
The proper rollback is to call unregister_netdevice, not free_netdev. Otherwise - kernel BUG at net/core/dev.c:4057!
Example of bug:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=822973ba79fd5a5b711270c2de7196c6b50c6687
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=38bddf04bcfe661fbdab94888c3b72c32f6873b3
Freeing netdev without free_netdev() leads to net, tx leaks. It might lead to dereferencing freed pointer.
Example of bug:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=b37e0c619dc231f292ed199f50c18f5bf508e16d
Actions