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 e2279fce651316502416036c93d1568b943318af..40f89d4d913ecb5e3c4766b62e328f03aec95960 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);