diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-10 19:14:35 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-10 19:14:35 +0100 |
commit | cf90523881521fe8396a728230169b6b8ea7e8da (patch) | |
tree | 3beba4f9b618f8db6637982fea5a5ae31ded8d12 /device.h | |
parent | bc1902d31fe5d751a50981d668cc1356b4796639 (diff) |
device: protect device event broadcast against simultaneous deletions of multiple receivers in the callback (can happen with aliases)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -75,6 +75,8 @@ enum device_event { DEV_EVENT_LINK_UP, DEV_EVENT_LINK_DOWN, + + __DEV_EVENT_MAX }; /* @@ -87,6 +89,8 @@ struct device_user { bool hotplug; bool alias; + uint8_t ev_idx[__DEV_EVENT_MAX]; + struct device *dev; void (*cb)(struct device_user *, enum device_event); }; |