From 5a4ac30c7a15712d01110befec1acfe86c2cbed0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 27 Sep 2021 18:56:21 +0200 Subject: 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 --- alias.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'alias.c') diff --git a/alias.c b/alias.c index 951e046..98d5410 100644 --- a/alias.c +++ b/alias.c @@ -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 * -- cgit v1.2.1