Martin Zaharinov <[email protected]> wrote:
> I use latest kernel 4.19.8 and have same problem see down
> i use pppoe with 1k+ users if i activate shaper with hfsc and imq machine
> crash and reboot
> after stop shaper for test mashine only send in dmesg bug error mesg.
dst_hold use there sure looks fishy. Can you try this patch?
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index e2b196054dfc..22f18444c95e 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -117,8 +117,10 @@ int nf_xfrm_me_harder(struct net *net, struct sk_buff
*skb, unsigned int family)
dst = skb_dst(skb);
if (dst->xfrm)
dst = ((struct xfrm_dst *)dst)->route;
- dst_hold(dst);
-
+ if (!dst_hold_safe(dst)) {
+ pr_warn_ratelimited("dst_hold_safe failure\n");
+ return -EHOSTUNREACH;
+ }
if (sk && !net_eq(net, sock_net(sk)))
sk = NULL;