linux/drivers/net/wan
Zefan Li 7e6932300a dlci: validate the net device in dlci_del()
commit 578a1310f2 upstream.

We triggered an oops while running trinity with 3.4 kernel:

BUG: unable to handle kernel paging request at 0000000100000d07
IP: [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
PGD 640c0d067 PUD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 3
...
Pid: 7302, comm: trinity-child3 Not tainted 3.4.24.09+ 40 Huawei Technologies Co., Ltd. Tecal RH2285          /BC11BTSA
RIP: 0010:[<ffffffffa0109738>]  [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
...
Call Trace:
  [<ffffffff8137c5c3>] sock_ioctl+0x153/0x280
  [<ffffffff81195494>] do_vfs_ioctl+0xa4/0x5e0
  [<ffffffff8118354a>] ? fget_light+0x3ea/0x490
  [<ffffffff81195a1f>] sys_ioctl+0x4f/0x80
  [<ffffffff81478b69>] system_call_fastpath+0x16/0x1b
...

It's because the net device is not a dlci device.

Reported-by: Li Jinyue <lijinyue@huawei.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-03 10:59:04 -07:00
..
lmc drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
.gitignore
c101.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
cosa.c cosa: Update to current logging forms 2011-06-27 00:09:46 -07:00
cosa.h
cycx_drv.c cyclom: Update to current logging forms 2011-06-27 00:09:46 -07:00
cycx_main.c cyclom: Update to current logging forms 2011-06-27 00:09:46 -07:00
cycx_x25.c cyclom: Update to current logging forms 2011-06-27 00:09:46 -07:00
dlci.c dlci: validate the net device in dlci_del() 2013-07-03 10:59:04 -07:00
dscc4.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
farsync.c drivers/net/wan/farsync.c: add missing iounmap 2012-04-17 22:31:59 -04:00
farsync.h
hd64570.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hd64570.h
hd64572.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hd64572.h
hdlc_cisco.c generic_hdlc: Update to current logging forms 2011-06-27 00:09:46 -07:00
hdlc_fr.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
hdlc_ppp.c net/wan/hdlc_ppp: use break in switch 2011-08-22 11:30:38 -07:00
hdlc_raw_eth.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
hdlc_raw.c
hdlc_x25.c wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
hdlc.c generic_hdlc: Update to current logging forms 2011-06-27 00:09:46 -07:00
hostess_sv11.c wan: Update to current logging forms 2011-06-27 00:09:47 -07:00
ixp4xx_hss.c ixp4xx_hss: fix build failure due to missing linux/module.h inclusion 2012-10-13 05:38:42 +09:00
Kconfig Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
lapbether.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Makefile
n2.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
pc300_drv.c NET: pc300, show version info from module init 2012-03-08 11:47:01 -08:00
pc300_tty.c NET: pc300, do not zero global variables 2012-03-08 11:47:01 -08:00
pc300-falc-lh.h
pc300.h
pc300too.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
pci200syn.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
sbni.c module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
sbni.h
sdla.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sealevel.c module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
wanxl.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
x25_asy.h
z85230.c wan: Update to current logging forms 2011-06-27 00:09:47 -07:00
z85230.h