diff options
| author | Sven Eckelmann <sven@narfation.org> | 2016-06-13 07:41:32 +0200 |
|---|---|---|
| committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-08-09 07:54:28 +0200 |
| commit | f4acb1086bc972f69e1ae14ec5b4473bc6c02dd5 (patch) | |
| tree | 12ce27ffd9d476342c13960d017e747d762188af /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | batman-adv: Revert "postpone sysfs removal when unregistering" (diff) | |
| download | linux-f4acb1086bc972f69e1ae14ec5b4473bc6c02dd5.tar.gz linux-f4acb1086bc972f69e1ae14ec5b4473bc6c02dd5.zip | |
batman-adv: Avoid sysfs name collision for netns moves
The kobject_put is only removing the sysfs entry and corresponding entries
when its reference counter becomes zero. This tends to lead to collisions
when a device is moved between two different network namespaces because
some of the sysfs files have to be removed first and then added again to
the already moved sysfs entry.
WARNING: CPU: 0 PID: 290 at lib/kobject.c:240 kobject_add_internal+0x5ec/0x8a0
kobject_add_internal failed for batman_adv with -EEXIST, don't try to register things with the same name in the same directory.
But the caller of kobject_put can already remove the sysfs entry before it
does the kobject_put. This removal is done even when the reference counter
is not yet zero and thus avoids the problem.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
