1
0
Fork 0
alistair23-linux/net/openvswitch
Pravin B Shelar 83ffe99f52 openvswitch: Fix ovs_vport_get_stats()
Not every device has dev->tstats set. So when OVS tries to calculate
vport stats it causes kernel panic. Following patch fixes it by
using standard API to get net-device stats.

---8<---
Unable to handle kernel paging request at virtual address 766b4008
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: vport_vxlan vxlan ip6_udp_tunnel udp_tunnel tun bridge stp llc openvswitch ipv6
CPU: 7 PID: 1108 Comm: ovs-vswitchd Not tainted 4.3.0-rc3+ #82
PC is at ovs_vport_get_stats+0x150/0x1f8 [openvswitch]
<snip>
Call trace:
 [<ffffffbffc0859f8>] ovs_vport_get_stats+0x150/0x1f8 [openvswitch]
 [<ffffffbffc07cdb0>] ovs_vport_cmd_fill_info+0x140/0x1e0 [openvswitch]
 [<ffffffbffc07cf0c>] ovs_vport_cmd_dump+0xbc/0x138 [openvswitch]
 [<ffffffc00045a5ac>] netlink_dump+0xb8/0x258
 [<ffffffc00045ace0>] __netlink_dump_start+0x120/0x178
 [<ffffffc00045dd9c>] genl_family_rcv_msg+0x2d4/0x308
 [<ffffffc00045de58>] genl_rcv_msg+0x88/0xc4
 [<ffffffc00045cf24>] netlink_rcv_skb+0xd4/0x100
 [<ffffffc00045dab0>] genl_rcv+0x30/0x48
 [<ffffffc00045c830>] netlink_unicast+0x154/0x200
 [<ffffffc00045cc9c>] netlink_sendmsg+0x308/0x364
 [<ffffffc00041e10c>] sock_sendmsg+0x14/0x2c
 [<ffffffc000420d58>] SyS_sendto+0xbc/0xf0
Code: aa1603e1 f94037a4 aa1303e2 aa1703e0 (f9400465)

Reported-by: Tomasz Sawicki <tomasz.sawicki@objectiveintegration.uk>
Fixes: 8c876639c9 ("openvswitch: Remove vport stats.")
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-05 07:06:35 -07:00
..
Kconfig openvswitch: Fix dependency on IPv6 defrag. 2015-09-11 15:39:04 -07:00
Makefile openvswitch: Remove conntrack Kconfig option. 2015-09-06 23:48:33 -07:00
actions.c openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
conntrack.c openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
conntrack.h openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
datapath.c openvswitch: Zero flows on allocation. 2015-09-22 17:33:41 -07:00
datapath.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
dp_notify.c openvswitch: Move dev pointer into vport itself 2015-07-21 10:39:07 -07:00
flow.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
flow.h openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
flow_netlink.c openvswitch: Rename LABEL->LABELS 2015-10-05 06:34:28 -07:00
flow_netlink.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
flow_table.c ovs: do not allocate memory from offline numa node 2015-10-05 06:42:03 -07:00
flow_table.h openvswitch: Zero flows on allocation. 2015-09-22 17:33:41 -07:00
vport-geneve.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport-gre.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport-internal_dev.c openvswitch: Remove vport stats. 2015-08-29 19:07:15 -07:00
vport-internal_dev.h openvswitch: introduce rtnl ops stub 2014-07-01 14:40:17 -07:00
vport-netdev.c openvswitch: Remove vport stats. 2015-08-29 19:07:15 -07:00
vport-netdev.h openvswitch: Remove vport stats. 2015-08-29 19:07:15 -07:00
vport-vxlan.c ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00
vport.c openvswitch: Fix ovs_vport_get_stats() 2015-10-05 07:06:35 -07:00
vport.h ip-tunnel: Use API to access tunnel metadata options. 2015-08-31 12:28:56 -07:00