From patchwork Thu Mar 15 06:56:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 146843 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D6B2DB6FA2 for ; Thu, 15 Mar 2012 17:56:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756324Ab2COG4U (ORCPT ); Thu, 15 Mar 2012 02:56:20 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:58032 "EHLO mail-pz0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754472Ab2COG4S (ORCPT ); Thu, 15 Mar 2012 02:56:18 -0400 Received: by dadp12 with SMTP id p12so4355107dad.11 for ; Wed, 14 Mar 2012 23:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version; bh=+IE1W09dzdFcwig9egmfxxmd4uaohY0tBOXcCvN5Sz8=; b=hgBT9mFeld1zWSyF1tb0m7kI/5zybK21do/XsGho38x5LMtdK6xQkBVnyDbqZK9d5q Kjq1OLfZXWFakAjghHZUvCe2OLjCQBkFAjUY4OBTHbTDfUKmys+iBATJpKSr98Ees7Rm 7pwG1VEK/DfWzCEQ4ykKlpeEjQ1rfSweW1zjRwhWxOXUEiK7LBAhJzCadvJ84mN7r3yw phbaf/8vYw4TMnOO+DQi5v3S0v/iXWpLvBeMfSLyBJglvSgV0y9aALvrOR7Zeo9mgzb7 VtZjKIDH3afSHSgAYnCV/F/58g8fBJUp8Nip/tln8bqeDYQmZaOOTzmle3GU2BFzHRlp /gwA== Received: by 10.68.197.228 with SMTP id ix4mr2611141pbc.101.1331794578492; Wed, 14 Mar 2012 23:56:18 -0700 (PDT) Received: from [10.0.0.4] (c-107-3-167-36.hsd1.ca.comcast.net. [107.3.167.36]) by mx.google.com with ESMTPS id 2sm1225240pbw.57.2012.03.14.23.56.16 (version=SSLv3 cipher=OTHER); Wed, 14 Mar 2012 23:56:17 -0700 (PDT) Message-ID: <1331794575.2543.17.camel@edumazet-laptop> Subject: Re: 3.3-rc snmp6 panic From: Eric Dumazet To: Dave Jones Cc: netdev@vger.kernel.org Date: Wed, 14 Mar 2012 23:56:15 -0700 In-Reply-To: <20120315052506.GA5974@redhat.com> References: <20120315052506.GA5974@redhat.com> X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le jeudi 15 mars 2012 à 01:25 -0400, Dave Jones a écrit : > I've been seeing an occasional panic when I shut down my router > since I put 3.3 on there. It happens about once a week, always during > shutdown. It wedges before I can get a good capture of the trace. > This is the best I've captured so far.. https://twitpic.com/8wh5l5 > (apologies in advance for blurriness) > > From comparing the Code: line, and the objdump output, the code it's > choking on in mld_sendpack seems to be a skb_dst macro in the NF_HOOK.. > > > err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, > 2dd9: 4c 8b 43 20 mov 0x20(%rbx),%r8 > 2ddd: e9 00 00 00 00 jmpq 2de2 > static inline struct dst_entry *skb_dst(const struct sk_buff *skb) > { > /* If refdst was not refcounted, check we still are in a > * rcu_read_lock section > */ > WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && > 2de2: 48 8b 43 58 mov 0x58(%rbx),%rax > 2de6: a8 01 test $0x1,%al > 2de8: 0f 85 d2 01 00 00 jne 2fc0 > !rcu_read_lock_held() && > !rcu_read_lock_bh_held()); > return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); > 2dee: 48 83 e0 fe and $0xfffffffffffffffe,%rax > 2df2: 48 89 df mov %rbx,%rdi > 2df5: ff 50 58 callq *0x58(%rax) <----- BOOM > > > This machine is running an snmpd, for my mrtg setup, so the teardown of that > service is probably what's triggering it. But I can start/stop it in a loop > as much as I want without it happening, so maybe the kernel needs to accumulate > some state from it for a while first ? > > Anyone have any ideas what's happening here ? > Hmm, please try : --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8c2e3ab..22b7664 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct net *net = dev_net(dev); if (unlikely(!idev)) - return NULL; + return ERR_PTR(-ENODEV); rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); if (unlikely(!rt)) {