kernel: fix crash in flow offload code when cleaning up unregistered hooks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2018-02-25 16:23:07 +01:00
parent 28a74f3076
commit 1ac14d312f

View file

@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ +
+restart: +restart:
+ hlist_for_each_entry(hook, &hooks, list) { + hlist_for_each_entry(hook, &hooks, list) {
+ if (hook->used) + if (hook->used || !hook->registered)
+ continue; + continue;
+ +
+ hlist_del(&hook->list); + hlist_del(&hook->list);