From 1ac14d312fc8042ab75abcac4decdb47a77c05f0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 25 Feb 2018 16:23:07 +0100 Subject: [PATCH] kernel: fix crash in flow offload code when cleaning up unregistered hooks Signed-off-by: Felix Fietkau --- .../generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch b/target/linux/generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch index e2279fce65..40f89d4d91 100644 --- a/target/linux/generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch +++ b/target/linux/generic/hack-4.14/650-netfilter-add-xt_OFFLOAD-target.patch @@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau + +restart: + hlist_for_each_entry(hook, &hooks, list) { -+ if (hook->used) ++ if (hook->used || !hook->registered) + continue; + + hlist_del(&hook->list); -- 2.30.2