kernel: fix crash in flow offload code when cleaning up unregistered hooks
authorFelix Fietkau <nbd@nbd.name>
Sun, 25 Feb 2018 15:23:07 +0000 (16:23 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sun, 25 Feb 2018 15:24:23 +0000 (16:24 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch

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