diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-09-27 18:56:21 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-09-27 18:58:01 +0200 |
commit | 5a4ac30c7a15712d01110befec1acfe86c2cbed0 (patch) | |
tree | ad52b0310a781078efb9b016fbe80d89ca50001d /alias.c | |
parent | 08e954e137ffcf7770200bbd6476dc36bbd326f5 (diff) | |
download | netifd-5a4ac30c7a15712d01110befec1acfe86c2cbed0.tar.gz |
netifd: rework/fix device free handling
Instead of explicitly preventing free in specific code sections using
device_lock/device_unlock, defer all device free handling via uloop timeout
This avoids an entire class of lurking use-after-free bugs triggered
by device event processing and simplifies the code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'alias.c')
-rw-r--r-- | alias.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -178,13 +178,9 @@ alias_notify_device(const char *name, struct device *dev) { struct alias_device *alias; - device_lock(); - alias = avl_find_element(&aliases, name, alias, avl); if (alias) alias_set_device(alias, dev); - - device_unlock(); } struct device * |