netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Fan Du <fan.du@windriver.com>,
	netdev@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [BUG] ipv6, rawv6_close(): BUG: unable to handle kernel paging request
Date: Mon, 22 Jul 2013 20:55:26 +0530	[thread overview]
Message-ID: <51ED4EE6.9050502@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130722121911.GB6538@order.stressinduktion.org>

On 07/22/2013 05:49 PM, Hannes Frederic Sowa wrote:
> On Mon, Jul 22, 2013 at 06:29:58PM +0800, Fan Du wrote:
>> Hallo Srivatsa
>>
>>
>> On 2013年07月22日 02:28, Srivatsa S. Bhat wrote:
>>> Hi,
>>>
>>> I'm seeing this on every boot.
>>>
>>> Version: Latest mainline (commit ea45ea70b)
>>
>> I tested with this commit using your updated IPv6 config, this incident 
>> didn't show up after several times of reboot.
>> Could you please elaborate your testing details if possible?
>>
>> A wild guess, it dereference mrt->mroute6_sk, indicating mrt is invalid.
> 
> Yes, that seems to be the case.
> 
> Could you test the following patch if you have a bit of time?
> 
> rtnl_lock is for some functions down lower the call stack in ip6mr_free_table.
>

This patch fixed the issue I was facing. Thanks!

Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 583e8d4..03986d3 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -259,10 +259,12 @@ static void __net_exit ip6mr_rules_exit(struct net *net)
>  {
>  	struct mr6_table *mrt, *next;
> 
> +	rtnl_lock();
>  	list_for_each_entry_safe(mrt, next, &net->ipv6.mr6_tables, list) {
>  		list_del(&mrt->list);
>  		ip6mr_free_table(mrt);
>  	}
> +	rtnl_unlock();
>  	fib_rules_unregister(net->ipv6.mr6_rules_ops);
>  }
>  #else
> @@ -289,7 +291,10 @@ static int __net_init ip6mr_rules_init(struct net *net)
> 
>  static void __net_exit ip6mr_rules_exit(struct net *net)
>  {
> +	rtnl_lock();
>  	ip6mr_free_table(net->ipv6.mrt6);
> +	net->ipv6.mrt6 = NULL;
> +	rtnl_unlock();
>  }
>  #endif
> 
> 

      reply	other threads:[~2013-07-22 15:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21 18:28 [BUG] ipv6, rawv6_close(): BUG: unable to handle kernel paging request Srivatsa S. Bhat
2013-07-21 20:53 ` Hannes Frederic Sowa
2013-07-21 21:10   ` Srivatsa S. Bhat
2013-07-21 21:27     ` Hannes Frederic Sowa
2013-07-21 21:30       ` Srivatsa S. Bhat
2013-07-22 10:29 ` Fan Du
2013-07-22 10:50   ` Srivatsa S. Bhat
2013-07-22 12:19   ` Hannes Frederic Sowa
2013-07-22 15:25     ` Srivatsa S. Bhat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51ED4EE6.9050502@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=fan.du@windriver.com \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).