android_kernel_motorola_sm6225/drivers/net
Pravin B Shelar f011baf95e vxlan: Fix kernel panic on device delete.
On vxlan device create if socket create fails vxlan device is not
added to hash table. Therefore we need to check if device
is in hashtable before we delete it from hlist.
Following patch avoid the crash. net-next already has this fix.

---8<---
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffa05f9ca7>] vxlan_dellink+0x77/0xf0 [vxlan]
PGD 42b2d9067 PUD 42e04c067 PMD 0
Oops: 0002 [#1] SMP
Modules linked in: vxlan(-)
Hardware name: Dell Inc. PowerEdge R620/0KCKR5, BIOS 1.4.8 10/25/2012
task: ffff88042ecf8760 ti: ffff88042f106000 task.ti: ffff88042f106000
RIP: 0010:[<ffffffffa05f9ca7>]  [<ffffffffa05f9ca7>]
vxlan_dellink+0x77/0xf0 [vxlan]
RSP: 0018:ffff88042f107e28  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88082af08000 RCX: ffff88083fd80000
RDX: 0000000000000000 RSI: ffff88042f107e58 RDI: ffff88042e12f810
RBP: ffff88042f107e48 R08: ffffffff8166eca0 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88082af087c0
R13: ffff88042e12f000 R14: ffff88042f107e58 R15: ffff88042f107e58
FS:  00007f4ed2de7700(0000) GS:ffff88043fc80000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000042e076000 CR4: 00000000000407e0
Stack:
 ffff88082af08000 ffffffff81654848 ffffffffa05fb4e0 ffffffff81654780
 ffff88042f107e98 ffffffff813b9c7a ffff88042f107e58 ffff88042f107e58
 ffff88042f107e88 ffffffffa05fb4e0 ffffffffa05fb780 ffff88042f107f18
Call Trace:
 [<ffffffff813b9c7a>] __rtnl_link_unregister+0xca/0xd0
 [<ffffffff813bb0e9>] rtnl_link_unregister+0x19/0x30
 [<ffffffffa05faa4c>] vxlan_cleanup_module+0x10/0x2f [vxlan]
 [<ffffffff81099fef>] SyS_delete_module+0x1cf/0x2c0
 [<ffffffff8146c069>] ? do_page_fault+0x9/0x10
 [<ffffffff8146f012>] system_call_fastpath+0x16/0x1b
Code: 4d 85 ed 0f 84 95 00 00 00 4c 8d a7 c0 07 00 00 49 8d bd 10 08 00
00 e8 28 e8 e6 e0 48 8b 83 c0 07 00 00 49 8b 54 24 08 48 85 c0 <48> 89
02 74 04 48 89 50 08 49 b8 00 02 20 00 00 00 ad de 4d 89
RIP  [<ffffffffa05f9ca7>] vxlan_dellink+0x77/0xf0 [vxlan]
 RSP <ffff88042f107e28>
CR2: 0000000000000000

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-05 14:31:02 -04:00
..
appletalk
arcnet arcnet: cleanup sizeof parameter 2013-07-19 17:36:03 -07:00
bonding bonding: modify only neigh_parms owned by us 2013-08-05 15:19:04 -07:00
caif drivers/net: caif: fix wrong rtnl_is_locked() usage 2013-07-09 12:55:48 -07:00
can can: pcan_usb: fix wrong memcpy() bytes length 2013-08-11 21:51:49 -07:00
cris
dsa
ethernet net: mvneta: implement ->ndo_do_ioctl() to support PHY ioctls 2013-09-05 14:31:01 -04:00
fddi
hamradio
hippi
hyperv hyperv: Fix the NETIF_F_SG flag setting in netvsc 2013-07-16 23:02:24 -07:00
ieee802154 drivers/net/ieee802154: don't use devm_pinctrl_get_select_default() in probe 2013-07-11 17:18:27 -07:00
irda via-ircc: don't return zero if via_ircc_open() failed 2013-08-20 13:27:28 -07:00
phy net: phy: rtl8211: fix interrupt on status link change 2013-08-20 17:10:58 -07:00
plip
ppp
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-19 16:49:39 -07:00
usb net: usb: Add HP hs2434 device to ZLP exception table 2013-08-28 18:22:15 -04:00
vmxnet3
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-03 14:55:13 -07:00
wimax
wireless ath9k: Enable PLL fix only for AR9340/AR9330 2013-08-22 14:21:04 -04:00
xen-netback xen-netback: xenbus.c: use more current logging styles 2013-07-02 00:52:55 -07:00
dummy.c dummy: fix oops when loading the dummy failed 2013-07-11 11:59:20 -07:00
eql.c
ifb.c ifb: fix oops when loading the ifb failed 2013-07-11 12:00:05 -07:00
Kconfig packet: nlmon: virtual netlink monitoring device for packet sockets 2013-06-24 16:39:05 -07:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: validate flags 2013-08-05 11:02:48 -07:00
macvtap.c macvtap: Ignore tap features when VNET_HDR is off 2013-08-20 13:09:12 -07:00
Makefile packet: nlmon: virtual netlink monitoring device for packet sockets 2013-06-24 16:39:05 -07:00
mdio.c
mii.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
nlmon.c nlmon: use standard rtnetlink link api for add/del devices 2013-07-02 12:53:17 -07:00
ntb_netdev.c
rionet.c rapidio/rionet: rework driver initialization and removal 2013-07-03 16:08:04 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: signedness bug in tun_get_user() 2013-08-15 14:51:23 -07:00
veth.c veth: add vlan features 2013-07-19 17:36:03 -07:00
virtio_net.c No real surprises. 2013-07-10 14:50:58 -07:00
vxlan.c vxlan: Fix kernel panic on device delete. 2013-09-05 14:31:02 -04:00
xen-netfront.c xen-netfront: pull on receive skb may need to happen earlier 2013-07-17 12:51:19 -07:00