From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: 4.15.13 kernel panic, ip_rcv_finish, nf_xfrm_me_harder warnings continue to fill dmesg Date: Sun, 9 Dec 2018 19:32:57 +0100 Message-ID: <20181209183257.z2yn5zggcgumbvgd@breakpoint.cc> References: <1C9877CE-F8CF-44EE-AD2F-70C3D9A5A899@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: nuclearcat@nuclearcat.com, netdev@vger.kernel.org To: Martin Zaharinov Return-path: Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:53884 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbeLISc7 (ORCPT ); Sun, 9 Dec 2018 13:32:59 -0500 Content-Disposition: inline In-Reply-To: <1C9877CE-F8CF-44EE-AD2F-70C3D9A5A899@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Martin Zaharinov 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;