public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@virtuozzo•com>
To: "David S. Miller" <davem@davemloft•net>, netdev@vger•kernel.org
Cc: intel-wired-lan@lists•osuosl.org,
	Jeff Kirsher <jeffrey.t.kirsher@intel•com>,
	Hannes Frederic Sowa <hannes@stressinduktion•org>,
	Cong Wang <xiyou.wangcong@gmail•com>
Subject: [PATCH 3/3] ipmr_free_table() should be called under taken rtnl_lock
Date: Tue, 07 Jul 2015 18:53:55 +0300	[thread overview]
Message-ID: <559BF613.7090904@virtuozzo.com> (raw)

ipmr_free_table() calls unregister_netdevice_many() inside
and changes net_todo_list protected by rtnl_lock

Signed-off-by: Vasily Averin <vvs@virtuozzo•com>
---
 net/ipv6/ip6mr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 74ceb73..9108636 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -250,7 +250,9 @@ static int __net_init ip6mr_rules_init(struct net *net)
 	return 0;
 
 err2:
+	rtnl_lock();
 	ip6mr_free_table(mrt);
+	rtnl_unlock();
 err1:
 	fib_rules_unregister(ops);
 	return err;
-- 
1.9.1

             reply	other threads:[~2015-07-07 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 15:53 Vasily Averin [this message]
2015-07-07 17:13 ` [PATCH 3/3] ipmr_free_table() should be called under taken rtnl_lock Cong Wang
2015-07-07 17:25   ` Vasily Averin
2015-07-07 17:30     ` Cong Wang
2015-07-07 17:53       ` Vasily Averin
2015-07-08 10:29         ` Vasily Averin
2015-07-08 11:46           ` Vasily Averin

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=559BF613.7090904@virtuozzo.com \
    --to=vvs@virtuozzo$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hannes@stressinduktion$(echo .)org \
    --cc=intel-wired-lan@lists$(echo .)osuosl.org \
    --cc=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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