WANG Cong
8795ee7bed
ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
...
[ Upstream commit 242d3a49a2 ]
For each netns (except init_net), we initialize its null entry
in 3 places:
1) The template itself, as we use kmemdup()
2) Code around dst_init_metrics() in ip6_route_net_init()
3) ip6_route_dev_notify(), which is supposed to initialize it after
loopback registers
Unfortunately the last one still happens in a wrong order because
we expect to initialize net->ipv6.ip6_null_entry->rt6i_idev to
net->loopback_dev's idev, thus we have to do that after we add
idev to loopback. However, this notifier has priority == 0 same as
ipv6_dev_notf, and ipv6_dev_notf is registered after
ip6_route_dev_notifier so it is called actually after
ip6_route_dev_notifier. This is similar to commit 2f460933f5
("ipv6: initialize route null entry in addrconf_init()") which
fixes init_net.
Fix it by picking a smaller priority for ip6_route_dev_notifier.
Also, we have to release the refcnt accordingly when unregistering
loopback_dev because device exit functions are called before subsys
exit functions.
Acked-by: David Ahern <dsahern@gmail.com >
Tested-by: David Ahern <dsahern@gmail.com >
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-05-14 14:00:21 +02:00
..
2015-04-11 22:28:27 -04:00
2016-11-22 22:50:46 +01:00
2015-02-20 17:35:14 -05:00
2014-12-10 15:33:16 -05:00
2015-09-21 16:03:04 -07:00
2016-11-24 14:43:35 +01:00
2016-09-25 23:34:19 +02:00
2016-07-11 02:01:14 +02:00
2016-02-11 03:54:14 -05:00
2016-10-31 16:20:33 -04:00
2016-09-23 07:22:11 -04:00
2016-06-15 20:41:22 -07:00
2016-08-17 19:27:51 -04:00
2017-05-14 14:00:21 +02:00
2015-09-17 13:20:05 +02:00
2016-09-08 11:10:12 +01:00
2016-09-04 13:29:29 -07:00
2016-08-02 02:57:29 +03:00
2014-09-18 10:54:36 +02:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2016-02-09 04:45:49 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2016-09-27 21:15:21 -04:00
2015-11-18 16:17:38 -05:00
2016-06-27 15:06:17 -04:00
2017-01-09 08:32:17 +01:00
2016-07-08 12:20:57 +02:00
2016-03-13 15:01:00 -04:00
2017-02-18 15:11:41 +01:00
2016-04-19 20:09:25 -04:00
2016-04-25 16:44:27 -04:00
2016-06-25 12:19:35 -04:00
2016-04-25 16:44:27 -04:00
2016-06-09 23:41:03 -07:00
2014-02-09 17:32:50 -08:00
2013-12-06 12:37:56 -05:00
2015-03-06 21:50:02 -05:00
2016-08-26 11:55:18 -07:00
2013-12-10 21:50:00 -05:00
2013-09-20 14:49:32 -04:00
2015-09-17 17:18:37 -07:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2016-09-23 08:38:50 -04:00
2016-02-16 20:21:48 -05:00
2016-09-10 20:53:55 -07:00
2015-10-08 04:27:02 -07:00
2016-04-25 16:20:09 -04:00
2013-11-07 19:28:58 -05:00
2015-09-23 15:33:15 -07:00
2016-06-08 11:36:02 -07:00
2013-03-26 12:32:13 -04:00
2016-09-01 16:51:08 -07:00
2016-09-10 23:12:53 -07:00
2014-02-12 07:02:11 +01:00
2016-05-20 18:03:16 -04:00
2016-09-30 13:29:21 +02:00
2016-09-30 13:29:21 +02:00
2013-09-20 14:49:33 -04:00
2016-06-07 16:37:14 -07:00
2016-02-18 11:42:19 -05:00
2016-06-17 20:23:32 -07:00
2016-08-18 01:17:32 -04:00
2016-11-15 22:27:27 -05:00
2016-07-25 17:55:43 -07:00
2014-11-05 16:30:03 -05:00
2016-03-14 12:19:46 -04:00
2016-04-27 22:48:25 -04:00
2016-09-12 11:45:45 +02:00
2016-01-04 20:40:41 +01:00
2016-10-14 10:59:15 -04:00
2015-12-15 23:25:20 -05:00
2016-03-22 15:45:44 -04:00
2016-04-04 22:11:20 -04:00
2016-05-20 18:03:17 -04:00
2016-09-21 00:23:01 -04:00
2016-08-13 15:08:00 -07:00
2016-02-16 20:42:54 -05:00
2016-04-04 22:11:20 -04:00
2016-06-27 15:05:28 -04:00
2015-10-20 06:08:27 -07:00
2015-12-16 00:14:12 -05:00
2016-03-13 23:55:13 -04:00
2016-10-27 16:30:52 -04:00
2017-05-14 14:00:21 +02:00
2016-11-02 15:18:36 -04:00
2016-11-16 13:24:50 -05:00
2016-09-17 10:13:07 -04:00
2016-06-06 09:47:25 +09:00
2016-11-03 16:10:26 -04:00
2017-02-18 15:11:44 +01:00
2014-11-24 04:28:49 -05:00
2016-01-29 17:13:43 +01:00
2016-08-17 19:36:23 -04:00
2016-10-13 12:05:26 -04:00
2013-09-21 14:01:38 -04:00
2014-10-14 02:18:27 +02:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2015-05-11 10:50:17 -04:00
2013-09-21 14:01:38 -04:00
2014-01-01 22:22:43 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2013-09-21 14:01:38 -04:00
2014-01-03 20:56:48 -05:00
2017-02-18 15:11:42 +01:00
2016-10-26 08:01:07 +02:00
2016-07-08 13:23:12 +02:00
2013-12-06 12:37:56 -05:00
2014-09-22 16:23:15 -04:00
2015-10-23 06:26:42 -07:00
2016-10-03 02:00:22 -04:00
2013-10-01 17:06:14 -04:00
2016-10-04 02:11:51 -04:00
2016-06-15 20:41:23 -07:00
2015-08-10 13:46:21 -07:00
2016-11-18 14:01:58 -05:00
2016-07-05 09:06:29 -07:00
2016-06-27 15:06:18 -04:00
2016-05-16 13:46:23 -04:00
2015-12-08 22:02:33 -05:00
2013-09-21 14:01:39 -04:00
2016-07-08 12:20:57 +02:00
2013-09-21 14:01:39 -04:00
2016-03-23 22:09:58 -04:00
2016-09-28 05:02:44 -04:00
2016-08-10 17:19:02 -07:00
2016-08-15 10:55:53 -07:00
2016-04-07 16:53:30 -04:00
2013-09-23 01:51:08 -04:00
2016-02-11 03:54:14 -05:00
2013-09-23 01:51:08 -04:00
2014-01-21 23:17:20 -08:00
2014-12-17 11:49:55 +01:00
2016-04-04 22:11:19 -04:00
2013-09-23 01:51:08 -04:00
2016-09-10 23:12:53 -07:00
2016-06-30 06:15:04 -04:00
2016-09-19 01:47:18 -04:00
2016-02-08 10:30:42 -05:00
2014-06-02 11:00:41 -07:00
2016-04-28 11:49:45 -04:00
2016-01-19 14:44:23 -05:00
2016-11-03 16:16:50 -04:00
2013-12-19 18:51:20 -05:00
2013-09-23 01:51:09 -04:00
2016-08-28 23:32:41 -04:00
2016-09-28 04:48:00 -04:00
2015-03-12 22:58:12 -04:00
2016-11-13 12:30:02 -05:00
2015-07-09 15:12:20 -07:00
2016-05-03 16:08:14 -04:00
2015-10-26 22:24:22 -07:00
2016-06-17 20:23:32 -07:00
2016-10-20 14:45:52 -04:00
2015-02-04 01:34:15 -05:00
2013-07-27 22:14:06 -07:00
2016-10-29 20:56:31 -04:00
2013-09-23 16:29:40 -04:00
2014-09-05 17:35:28 -07:00
2013-09-23 16:29:41 -04:00
2016-09-23 06:46:57 -04:00