Actions
Feature #3327
open138: NAPI context resource leaks - netif_napi_del and netif_napi_add
Start date:
08/07/2012
Due date:
% Done:
0%
Estimated time:
Published in build:
Description
commit ad1be8d345416a794dea39761a374032aa471a76 upstream. when register_netdev fails, the init'ed NAPIs by netif_napi_add must be deleted with netif_napi_del, and also when driver unloads, it should delete the NAPI before unregistering netdevice using unregister_netdev.
Also it can be checked that
'netif_napi_add() must be used to initialize a napi context prior to calling any of the other napi related functions'.
Updated by Ilya Shchepetkov over 12 years ago
netif_napi_del() is called in free_netdev() in most cases. In other cases, I don't understand yet under which conditions the call is needed. So, this rule delayed for an indefinite time.
Updated by Alexey Khoroshilov about 12 years ago
One more example of related commit:
Napi structures are being created each time we open a port, but when the port is closed the napi structure is only disabled but not removed. This bug caused hang while removing the driver.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=72876a60
Updated by Evgeny Novikov about 12 years ago
This rule was extracted during our commits analysis also. Here is an example
Updated by Ilya Shchepetkov over 11 years ago
- Status changed from New to Resolved
Added in commit 9e5058f of master branch.
Updated by Evgeny Novikov about 10 years ago
- Status changed from Resolved to Open
- Assignee changed from Ilya Shchepetkov to Evgeny Novikov
There is commit 7cb2521 that should be in LDV Validation.
Actions