Mahesh Bandewar
395eea6ccf
rtnetlink: delay RTM_DELLINK notification until after ndo_uninit()
...
The commit 56bfa7ee7c ("unregister_netdevice : move RTM_DELLINK to
until after ndo_uninit") tried to do this ealier but while doing so
it created a problem. Unfortunately the delayed rtmsg_ifinfo() also
delayed call to fill_info(). So this translated into asking driver
to remove private state and then query it's private state. This
could have catastropic consequences.
This change breaks the rtmsg_ifinfo() into two parts - one takes the
precise snapshot of the device by called fill_info() before calling
the ndo_uninit() and the second part sends the notification using
collected snapshot.
It was brought to notice when last link is deleted from an ipvlan device
when it has free-ed the port and the subsequent .fill_info() call is
trying to get the info from the port.
kernel: [ 255.139429] ------------[ cut here ]------------
kernel: [ 255.139439] WARNING: CPU: 12 PID: 11173 at net/core/rtnetlink.c:2238 rtmsg_ifinfo+0x100/0x110()
kernel: [ 255.139493] Modules linked in: ipvlan bonding w1_therm ds2482 wire cdc_acm ehci_pci ehci_hcd i2c_dev i2c_i801 i2c_core msr cpuid bnx2x ptp pps_core mdio libcrc32c
kernel: [ 255.139513] CPU: 12 PID: 11173 Comm: ip Not tainted 3.18.0-smp-DEV #167
kernel: [ 255.139514] Hardware name: Intel RML,PCH/Ibis_QC_18, BIOS 1.0.10 05/15/2012
kernel: [ 255.139515] 0000000000000009 ffff880851b6b828 ffffffff815d87f4 00000000000000e0
kernel: [ 255.139516] 0000000000000000 ffff880851b6b868 ffffffff8109c29c 0000000000000000
kernel: [ 255.139518] 00000000ffffffa6 00000000000000d0 ffffffff81aaf580 0000000000000011
kernel: [ 255.139520] Call Trace:
kernel: [ 255.139527] [<ffffffff815d87f4>] dump_stack+0x46/0x58
kernel: [ 255.139531] [<ffffffff8109c29c>] warn_slowpath_common+0x8c/0xc0
kernel: [ 255.139540] [<ffffffff8109c2ea>] warn_slowpath_null+0x1a/0x20
kernel: [ 255.139544] [<ffffffff8150d570>] rtmsg_ifinfo+0x100/0x110
kernel: [ 255.139547] [<ffffffff814f78b5>] rollback_registered_many+0x1d5/0x2d0
kernel: [ 255.139549] [<ffffffff814f79cf>] unregister_netdevice_many+0x1f/0xb0
kernel: [ 255.139551] [<ffffffff8150acab>] rtnl_dellink+0xbb/0x110
kernel: [ 255.139553] [<ffffffff8150da90>] rtnetlink_rcv_msg+0xa0/0x240
kernel: [ 255.139557] [<ffffffff81329283>] ? rhashtable_lookup_compare+0x43/0x80
kernel: [ 255.139558] [<ffffffff8150d9f0>] ? __rtnl_unlock+0x20/0x20
kernel: [ 255.139562] [<ffffffff8152cb11>] netlink_rcv_skb+0xb1/0xc0
kernel: [ 255.139563] [<ffffffff8150a495>] rtnetlink_rcv+0x25/0x40
kernel: [ 255.139565] [<ffffffff8152c398>] netlink_unicast+0x178/0x230
kernel: [ 255.139567] [<ffffffff8152c75f>] netlink_sendmsg+0x30f/0x420
kernel: [ 255.139571] [<ffffffff814e0b0c>] sock_sendmsg+0x9c/0xd0
kernel: [ 255.139575] [<ffffffff811d1d7f>] ? rw_copy_check_uvector+0x6f/0x130
kernel: [ 255.139577] [<ffffffff814e11c9>] ? copy_msghdr_from_user+0x139/0x1b0
kernel: [ 255.139578] [<ffffffff814e1774>] ___sys_sendmsg+0x304/0x310
kernel: [ 255.139581] [<ffffffff81198723>] ? handle_mm_fault+0xca3/0xde0
kernel: [ 255.139585] [<ffffffff811ebc4c>] ? destroy_inode+0x3c/0x70
kernel: [ 255.139589] [<ffffffff8108e6ec>] ? __do_page_fault+0x20c/0x500
kernel: [ 255.139597] [<ffffffff811e8336>] ? dput+0xb6/0x190
kernel: [ 255.139606] [<ffffffff811f05f6>] ? mntput+0x26/0x40
kernel: [ 255.139611] [<ffffffff811d2b94>] ? __fput+0x174/0x1e0
kernel: [ 255.139613] [<ffffffff814e2129>] __sys_sendmsg+0x49/0x90
kernel: [ 255.139615] [<ffffffff814e2182>] SyS_sendmsg+0x12/0x20
kernel: [ 255.139617] [<ffffffff815df092>] system_call_fastpath+0x12/0x17
kernel: [ 255.139619] ---[ end trace 5e6703e87d984f6b ]---
Signed-off-by: Mahesh Bandewar <maheshb@google.com >
Reported-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Roopa Prabhu <roopa@cumulusnetworks.com >
Cc: David S. Miller <davem@davemloft.net >
Acked-by: Eric Dumazet <edumazet@google.com >
Acked-by: Thomas Graf <tgraf@suug.ch >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-12-09 13:36:57 -05:00
..
2014-09-24 10:25:52 +01:00
2014-11-11 16:31:11 -05:00
2014-08-06 18:01:23 -07:00
2014-11-18 13:23:31 +01:00
2014-10-14 12:57:02 -07:00
2014-10-15 07:05:03 +02:00
2014-04-04 21:07:28 -07:00
2014-08-08 15:57:26 -07:00
2014-10-15 20:31:05 +05:30
2014-09-22 16:48:47 +09:00
2014-10-09 14:58:15 -04:00
2014-05-16 00:55:30 +02:00
2014-08-09 09:15:07 -07:00
2014-11-15 16:04:56 +00:00
2014-08-07 23:37:07 -07:00
2014-10-09 06:42:04 -04:00
2014-06-04 23:13:41 -07:00
2014-09-09 16:01:09 -04:00
2014-11-10 15:22:02 +00:00
2014-11-16 15:59:13 -05:00
2014-12-08 20:45:54 -05:00
2014-10-03 14:18:17 +02:00
2014-10-21 13:46:03 -07:00
2014-09-15 22:20:21 +02:00
2014-07-22 12:46:11 +05:30
2014-09-04 19:21:45 +02:00
2014-12-08 20:26:59 -05:00
2014-10-28 03:30:21 +01:00
2014-10-13 13:05:58 +02:00
2014-06-04 16:54:05 -07:00
2014-09-24 11:53:39 -07:00
2014-10-18 18:11:04 -07:00
2014-07-18 13:45:24 -04:00
2014-10-08 12:51:44 -04:00
2014-10-28 17:26:19 -04:00
2014-08-07 14:40:09 -04:00
2014-10-24 11:21:43 -07:00
2014-09-16 16:28:34 -06:00
2014-08-16 08:35:34 -04:00
2014-07-09 16:02:41 +02:00
2014-07-07 21:34:43 -07:00
2014-08-23 13:05:08 -04:00
2014-10-27 14:16:19 -04:00
2014-09-08 10:54:03 +02:00
2014-09-09 13:58:58 +02:00
2014-06-21 11:37:35 +01:00
2014-08-13 10:31:57 +02:00
2014-10-22 16:14:03 -06:00
2014-09-08 10:00:43 -06:00
2014-05-27 01:29:01 +02:00
2014-10-09 22:26:01 -04:00
2014-04-07 16:36:05 -07:00
2014-10-03 15:28:18 -06:00
2014-08-06 18:01:27 -07:00
2014-11-16 09:55:39 +01:00
2014-10-14 09:00:44 -06:00
2014-03-13 09:38:42 -06:00
2014-10-18 11:53:51 -07:00
2014-11-02 14:39:35 -08:00
2014-11-13 16:17:06 -08:00
2014-12-05 21:47:32 -08:00
2014-10-01 22:12:48 -04:00
2014-09-04 22:04:42 -04:00
2014-07-24 21:53:47 +10:00
2014-09-24 14:23:34 +08:00
2014-05-19 16:37:06 -04:00
2014-09-19 09:29:32 -04:00
2014-09-27 12:52:33 -07:00
2014-11-17 11:13:52 -08:00
2014-10-15 07:05:03 +02:00
2014-10-22 16:14:03 -06:00
2014-10-27 13:00:55 +01:00
2014-09-29 14:36:26 -04:00
2014-10-09 22:25:54 -04:00
2014-04-02 12:51:41 -07:00
2014-04-09 13:44:35 -07:00
2014-10-28 11:03:40 +01:00
2014-10-28 11:03:40 +01:00
2014-04-15 09:15:39 -07:00
2014-06-12 19:18:49 -07:00
2014-07-03 11:32:43 +01:00
2014-05-27 13:56:21 -07:00
2014-05-28 13:37:21 -07:00
2014-06-25 13:26:47 -07:00
2014-09-18 16:22:27 -07:00
2014-10-21 00:51:01 +02:00
2014-10-21 00:51:01 +02:00
2014-06-09 18:10:34 -07:00
2014-08-28 08:58:57 -04:00
2014-10-10 07:24:40 -04:00
2014-03-13 15:56:44 +01:00
2014-10-22 16:14:04 -06:00
2014-05-16 14:26:52 -04:00
2014-06-25 16:04:00 -07:00
2014-09-27 09:14:59 -06:00
2014-07-17 16:15:35 -04:00
2014-08-01 22:35:55 +08:00
2014-10-12 17:09:06 -04:00
2014-05-08 14:28:07 +08:00
2014-09-23 22:53:15 -07:00
2014-05-24 22:33:41 +09:00
2014-06-04 09:46:34 -04:00
2014-10-15 07:23:49 +02:00
2014-07-08 13:36:52 -07:00
2014-08-06 18:01:16 -07:00
2014-08-26 07:39:13 +02:00
2014-10-18 18:11:04 -07:00
2014-10-02 12:12:25 +02:00
2014-07-10 18:35:01 +02:00
2014-07-10 18:35:01 +02:00
2014-07-10 18:35:23 +02:00
2014-10-03 14:55:48 -07:00
2014-09-29 00:04:55 -04:00
2014-06-26 15:46:55 -03:00
2014-10-03 18:41:03 +01:00
2014-06-22 16:34:11 -06:00
2014-04-03 16:21:06 -07:00
2014-12-08 20:47:41 -05:00
2014-12-08 21:07:10 -05:00
2014-04-29 09:45:56 +09:00
2014-09-23 11:10:20 -07:00
2014-07-01 13:32:32 +03:00
2014-04-01 23:19:14 -04:00
2014-07-08 13:41:08 -07:00
2014-12-05 21:47:32 -08:00
2014-05-26 14:33:10 +02:00
2014-07-08 15:28:16 -07:00
2014-09-08 09:51:30 +09:00
2014-10-09 11:35:48 +03:00
2014-10-08 16:01:41 -04:00
2014-08-07 14:40:08 -04:00
2014-10-31 06:33:26 -04:00
2014-09-03 18:02:55 -05:00
2014-10-15 21:31:27 +05:30
2014-08-06 18:01:12 -07:00
2014-08-09 17:33:44 -07:00
2014-09-10 10:48:45 -04:00
2014-10-09 22:25:52 -04:00
2014-04-18 14:20:48 +02:00
2014-10-14 17:03:53 -04:00
2014-10-09 22:25:55 -04:00
2014-08-06 18:01:24 -07:00
2014-05-20 10:30:40 +09:00
2014-05-14 16:39:49 -07:00
2014-11-14 16:36:25 -05:00
2014-03-13 12:48:32 +01:00
2014-05-05 10:59:49 +01:00
2014-04-29 22:11:53 +01:00
2014-10-06 23:34:40 +02:00
2014-08-06 18:01:22 -07:00
2014-08-04 10:07:36 +02:00
2014-07-23 10:17:54 -07:00
2014-10-09 22:25:57 -04:00
2014-08-06 18:01:19 -07:00
2014-07-15 04:49:40 -04:00
2014-12-08 20:24:11 -05:00
2014-09-25 16:07:15 +02:00
2014-06-06 16:08:13 -07:00
2014-11-19 18:45:16 +01:00
2014-11-17 09:49:17 +01:00
2014-12-02 20:01:23 -08:00
2014-05-23 15:04:02 -04:00
2014-09-29 15:37:01 -04:00
2014-06-02 14:56:01 -07:00
2014-11-21 14:20:17 -05:00
2014-09-04 22:26:14 -07:00
2014-09-09 10:28:43 -04:00
2014-11-14 17:08:58 -05:00
2014-09-07 16:27:34 -07:00
2014-05-27 14:26:31 -07:00
2014-05-14 16:40:04 -07:00
2014-07-04 12:35:59 +02:00
2014-09-01 13:48:59 +02:00
2014-07-23 12:02:30 +02:00
2014-10-15 07:23:49 +02:00
2014-09-04 14:41:43 -06:00
2014-07-23 16:04:47 +02:00
2014-09-23 23:13:13 -07:00
2014-04-17 12:30:40 -07:00
2014-04-17 12:23:07 -07:00
2014-11-05 16:59:04 -05:00
2014-09-13 18:38:15 +02:00
2014-09-01 13:48:51 +02:00
2014-10-09 16:07:43 -04:00
2014-06-21 23:03:36 +02:00
2014-08-02 15:03:58 -07:00
2014-09-18 00:58:12 -04:00
2014-09-12 13:59:03 -07:00
2014-08-10 09:00:16 +02:00
2014-11-16 10:04:18 +01:00
2014-10-23 14:45:09 -07:00
2014-10-14 15:05:34 -04:00
2014-07-10 11:38:23 -07:00
2014-10-14 02:18:21 +02:00
2014-09-16 17:36:08 +01:00
2014-07-22 21:55:45 +01:00
2014-09-09 10:34:56 +02:00
2014-10-22 16:14:04 -06:00
2014-10-29 16:33:14 -07:00
2014-08-06 18:01:24 -07:00
2014-06-06 16:08:17 -07:00
2014-04-25 12:00:49 -07:00
2014-06-12 19:18:49 -07:00
2014-07-28 14:16:30 -04:00
2014-07-23 10:17:54 -07:00
2014-11-26 14:40:45 +01:00
2014-08-29 16:35:53 +02:00
2014-09-12 14:01:54 -07:00
2014-04-07 16:36:14 -07:00
2014-09-23 10:02:31 -04:00
2014-05-05 16:07:37 -07:00
2014-04-03 16:21:01 -07:00
2014-10-14 02:18:13 +02:00
2014-10-13 15:51:40 +02:00
2014-10-08 10:39:41 +05:30
2014-10-08 10:39:41 +05:30
2014-10-24 15:49:20 -04:00
2014-03-18 19:19:41 -04:00
2014-04-24 05:00:36 +00:00
2014-06-06 16:08:07 -07:00
2014-05-27 17:38:11 -07:00
2014-04-16 15:09:51 -04:00
2014-09-29 11:56:02 -04:00
2014-08-06 18:01:15 -07:00
2014-10-29 16:33:15 -07:00
2014-10-09 22:25:52 -04:00
2014-10-22 16:14:04 -06:00
2014-10-09 22:25:56 -04:00
2014-07-11 18:27:56 -07:00
2014-11-21 14:08:56 -05:00
2014-10-09 22:26:01 -04:00
2014-05-27 17:43:11 -07:00
2014-08-08 15:57:23 -07:00
2014-10-29 16:33:14 -07:00
2014-10-09 22:25:58 -04:00
2014-09-24 14:07:58 +02:00
2014-11-13 16:17:05 -08:00
2014-04-09 13:44:35 -07:00
2014-07-27 20:52:44 +09:30
2014-07-27 20:52:42 +09:30
2014-10-14 02:18:28 +02:00
2014-10-24 00:14:36 +02:00
2014-10-01 12:21:23 -06:00
2014-08-13 10:32:03 +02:00
2014-07-16 12:58:36 +00:00
2014-04-01 23:19:10 -04:00
2014-05-14 00:37:34 -04:00
2014-11-05 23:52:33 -08:00
2014-12-02 20:01:22 -08:00
2014-09-26 18:42:31 +02:00
2014-08-25 10:45:28 +02:00
2014-06-03 23:32:12 -07:00
2014-03-29 17:58:37 -04:00
2014-09-30 16:24:56 -04:00
2014-09-30 16:24:56 -04:00
2014-10-18 11:53:51 -07:00
2014-08-22 18:04:43 -04:00
2014-11-12 14:22:51 -05:00
2014-05-29 11:11:48 -04:00
2014-04-03 16:21:26 -07:00
2014-10-25 08:07:30 +02:00
2014-10-14 02:18:27 +02:00
2014-08-06 18:01:21 -07:00
2014-07-29 18:08:50 -07:00
2014-04-07 10:59:19 -07:00
2014-06-13 10:43:34 -04:00
2014-09-30 17:08:40 -06:00
2014-07-26 00:21:41 +05:30
2014-07-29 21:26:45 -06:00
2014-05-21 11:14:46 +02:00
2014-05-23 11:40:25 +09:00
2014-07-02 00:24:14 -07:00
2014-09-30 17:08:57 -06:00
2014-07-07 13:33:46 +01:00
2014-10-29 16:33:14 -07:00
2014-11-04 10:19:48 +00:00
2014-07-09 14:58:37 +01:00
2014-09-18 09:53:25 -07:00
2014-06-10 14:35:22 -07:00
2014-07-29 12:38:07 +02:00
2014-10-21 23:44:21 +02:00
2014-07-16 13:28:05 +02:00
2014-08-08 15:57:18 -07:00
2014-08-06 18:01:17 -07:00
2014-11-13 16:17:05 -08:00
2014-06-04 16:54:09 -07:00
2014-10-09 22:26:01 -04:00
2014-04-03 16:21:00 -07:00
2014-09-12 20:09:52 -06:00
2014-10-15 06:58:16 +02:00
2014-11-05 13:06:16 -07:00
2014-11-24 14:11:34 +11:00
2014-07-09 14:58:37 +01:00
2014-09-08 09:51:29 +09:00
2014-08-26 13:45:56 -04:00
2014-11-23 12:36:06 -05:00
2014-09-02 14:46:05 -04:00
2014-08-24 08:11:09 -03:00
2014-10-07 13:06:45 -04:00
2014-11-21 14:08:55 -05:00
2014-08-04 10:07:11 -07:00
2014-04-12 14:49:50 -07:00
2014-10-08 10:39:33 +05:30
2014-07-08 15:31:26 -07:00
2014-06-04 16:54:07 -07:00
2014-11-11 22:28:44 +01:00
2014-05-07 00:39:03 +02:00
2014-09-25 01:18:33 +02:00
2014-07-23 01:00:36 +02:00
2014-10-07 01:18:12 +02:00
2014-10-19 20:22:32 +03:00
2014-10-28 03:30:19 +01:00
2014-08-13 15:13:44 +10:00
2014-09-17 16:33:11 -04:00
2014-05-18 19:01:33 -07:00
2014-09-08 09:51:30 +09:00
2014-07-07 16:57:18 -07:00
2014-03-21 14:21:13 -04:00
2014-07-03 17:27:23 -07:00
2014-05-07 10:15:31 +02:00
2014-05-21 11:19:36 +02:00
2014-03-21 18:26:03 +01:00
2014-10-28 16:48:02 -04:00
2014-07-15 22:40:22 +02:00
2014-04-03 16:20:54 -07:00
2014-04-03 16:21:01 -07:00
2014-08-24 18:36:01 -07:00
2014-06-25 11:22:03 -07:00
2014-10-14 02:18:21 +02:00
2014-12-08 20:39:57 -05:00
2014-10-28 18:25:17 -04:00
2014-09-07 16:27:35 -07:00
2014-05-14 09:46:09 -07:00
2014-09-26 00:00:06 -07:00
2014-07-25 19:01:53 +01:00
2014-04-07 16:35:54 -07:00
2014-07-08 13:41:08 -07:00
2014-04-14 16:47:28 +02:00
2014-04-11 09:29:16 +02:00
2014-11-13 15:18:40 -05:00
2014-11-10 16:45:43 -05:00
2014-08-08 15:57:24 -07:00
2014-04-07 16:36:07 -07:00
2014-10-09 22:25:57 -04:00
2014-06-19 21:17:37 -07:00
2014-06-21 22:05:30 +02:00
2014-12-09 13:36:57 -05:00
2014-07-16 14:56:55 +02:00
2014-08-13 10:32:03 +02:00
2014-08-08 15:57:26 -07:00
2014-04-22 13:38:33 -07:00
2014-10-13 16:23:15 +02:00
2014-10-09 22:26:04 -04:00
2014-09-03 14:58:17 -07:00
2014-10-12 10:13:55 -04:00
2014-09-19 12:35:16 +02:00
2014-08-28 11:59:38 +05:30
2014-09-29 18:20:38 -07:00
2014-09-26 18:01:56 +02:00
2014-03-21 04:12:33 +09:00
2014-03-17 16:20:49 -07:00
2014-04-19 22:42:19 -07:00
2014-07-23 01:10:45 +02:00
2014-07-09 10:55:57 +02:00
2014-07-02 16:01:51 +02:00
2014-05-02 21:48:33 +05:30
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2014-10-14 02:18:20 +02:00
2014-12-08 20:47:41 -05:00
2014-10-09 22:25:51 -04:00
2014-10-09 22:25:50 -04:00
2014-05-06 13:04:59 -07:00
2014-09-19 12:35:15 +02:00
2014-04-24 13:44:53 -04:00
2014-11-19 16:23:49 -05:00
2014-08-13 10:32:38 +02:00
2014-06-12 00:21:11 -04:00
2014-03-19 08:58:30 +00:00
2014-07-31 14:13:29 -07:00
2014-10-14 02:18:26 +02:00
2014-10-24 12:33:32 -07:00
2014-09-30 21:06:07 +02:00
2014-10-09 22:25:59 -04:00
2014-06-04 16:54:07 -07:00
2014-06-04 16:53:55 -07:00
2014-06-04 16:53:57 -07:00
2014-03-26 16:49:31 -04:00
2014-11-19 16:22:59 -05:00
2014-08-08 15:57:24 -07:00
2014-05-27 14:29:56 -07:00
2014-09-27 09:14:59 -06:00
2014-10-29 15:05:15 -04:00
2014-10-10 14:02:25 +08:00
2014-06-04 16:53:56 -07:00
2014-09-26 08:15:29 +01:00
2014-10-14 03:47:00 +02:00
2014-07-23 10:17:53 -07:00
2014-07-23 10:17:54 -07:00
2014-07-30 09:26:25 +02:00
2014-07-23 15:01:55 -07:00
2014-07-18 11:49:57 +02:00
2014-10-09 22:25:51 -04:00
2014-09-16 13:41:06 -07:00
2014-07-29 23:10:56 +02:00
2014-07-01 07:13:39 -04:00
2014-08-06 13:03:43 +02:00
2014-09-10 10:48:46 -04:00
2014-09-23 21:19:35 -07:00
2014-04-24 16:16:33 -07:00
2014-09-25 12:17:25 +02:00
2014-05-20 16:54:21 -06:00
2014-03-14 22:41:36 -04:00
2014-09-01 21:36:28 -07:00
2014-10-02 21:35:54 -07:00
2014-10-09 02:39:03 -04:00
2014-10-22 16:14:04 -06:00
2014-09-23 21:40:48 -07:00
2014-09-25 17:05:12 +02:00
2014-08-08 15:57:22 -07:00
2014-07-09 14:58:37 +01:00
2014-05-15 17:02:21 +01:00
2014-08-08 10:39:16 -06:00
2014-09-18 19:21:20 -04:00
2014-09-16 15:02:55 -06:00
2014-10-15 10:25:01 +10:30
2014-06-02 12:41:33 -07:00
2014-10-15 10:24:56 +10:30
2014-10-09 22:26:01 -04:00
2014-04-07 16:35:53 -07:00
2014-08-06 18:01:19 -07:00
2014-06-04 16:53:57 -07:00
2014-10-13 16:23:15 +02:00
2014-10-20 20:46:25 +02:00
2014-09-13 05:13:08 +09:00
2014-07-16 15:10:39 +02:00
2014-08-06 18:01:23 -07:00
2014-08-08 15:57:26 -07:00
2014-08-06 18:01:23 -07:00
2014-10-09 22:26:02 -04:00