linux/drivers
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
..
accessibility
acpi ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6 2013-06-13 09:45:00 -07:00
amba
ata libata: make ata_exec_internal_sg honor DMADIR 2013-06-07 12:49:33 -07:00
atm atm/iphase: rename fregt_t -> ffreg_t 2013-02-14 10:49:05 -08:00
auxdisplay
base regmap: cache Fix regcache-rbtree sync 2013-04-12 09:38:43 -07:00
bcma bcma: mips: fix clearing device IRQ 2013-01-17 08:50:41 -08:00
block cciss: fix broken mutex usage in ioctl 2013-06-20 11:58:45 -07:00
bluetooth Bluetooth: Add support for Dell[QCA 0cf3:817a] 2013-04-05 10:04:15 -07:00
cdrom
char ipmi: ipmi_devintf: compat_ioctl method fails to take ipmi_mutex 2013-05-19 10:54:49 -07:00
clk clk: remove notifier from list before freeing it 2013-06-27 11:27:30 -07:00
clocksource
connector
cpufreq cpufreq / Longhaul: Disable driver by default 2013-05-11 13:48:10 -07:00
cpuidle
crypto crypto: mv_cesa requires on CRYPTO_HASH to build 2012-05-15 01:10:06 +00:00
dca dca: check against empty dca_domains list before unregister provider 2013-02-28 06:59:06 -08:00
devfreq
dio
dma pch_dma: Use GFP_ATOMIC because called from interrupt context 2013-05-19 10:54:48 -07:00
edac EDAC: Test correct variable in ->store function 2013-02-03 18:24:41 -06:00
eisa EISA/PCI: Fix bus res reference 2013-04-12 09:38:44 -07:00
firewire firewire: add minor number range check to fw_device_init() 2013-03-04 06:06:41 +08:00
firmware efivars: Handle duplicate names from get_next_variable() 2013-04-05 10:04:36 -07:00
gpio gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios 2012-11-05 09:50:41 +01:00
gpu drm/i915: prefer VBT modes for SVDO-LVDS over EDID 2013-06-20 11:58:45 -07:00
hid HID: usbhid: quirk for Realtek Multi-card reader 2013-04-05 10:04:16 -07:00
hsi HSI: hsi_char: Remove max_data_size from sysfs 2012-04-23 14:23:32 +03:00
hv Drivers: hv: Cleanup error handling in vmbus_open() 2012-10-31 10:02:58 -07:00
hwmon hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617 2013-06-13 09:45:01 -07:00
hwspinlock hwspinlock: fix __hwspin_lock_request error path 2013-04-12 09:38:46 -07:00
i2c i2c: designware: always clear interrupts before enabling them 2013-05-24 11:14:22 -07:00
ide
idle
ieee802154
infiniband IPoIB: Fix send lockup due to missed TX completion 2013-03-28 12:12:25 -07:00
input Input: cyttsp - fix memcpy size param 2013-06-27 11:27:33 -07:00
iommu iommu/amd: Workaround for ERBT1312 2013-06-07 12:49:48 -07:00
isdn isdn/gigaset: fix zero size border case in debug dump 2013-02-14 10:49:04 -08:00
leds drivers/leds/leds-ot200.c: fix error caused by shifted mask 2013-06-07 12:49:13 -07:00
lguest
macintosh
mca
md md/raid1: consider WRITE as successful only if at least one non-Faulty and non-rebuilding drive completed it. 2013-06-20 11:58:46 -07:00
media media: mantis: fix silly crash case 2013-05-24 11:14:23 -07:00
memstick
message
mfd mfd: adp5520: Restore mode bits on resume 2013-05-07 19:51:57 -07:00
misc SGI-XP: handle non-fatal traps 2013-01-11 09:06:29 -08:00
mmc mmc: atmel-mci: pio hang on block errors 2013-05-07 19:51:57 -07:00
mtd vm: convert mtdchar mmap to vm_iomap_memory() helper 2013-04-25 21:19:56 -07:00
net dlci: validate the net device in dlci_del() 2013-07-03 10:59:04 -07:00
nfc NFC: pn533: Fix mem leak in pn533_in_dep_link_up 2012-12-03 11:47:12 -08:00
nubus
of
oprofile oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array 2012-07-16 09:04:21 -07:00
parisc parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
parport
pci PCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition() 2013-05-07 19:51:55 -07:00
pcmcia pcmcia/vrc4171: Add missing spinlock init 2013-02-28 06:59:05 -08:00
pinctrl pinctrl: tegra: set low power mode bank width to 2 2012-10-28 10:14:14 -07:00
platform thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR 2013-06-07 12:49:49 -07:00
pnp pnpacpi: fix incorrect TEST_ALPHA() test 2013-01-11 09:06:29 -08:00
power ab8500_btemp: Demote initcall sequence 2013-03-04 06:06:44 +08:00
pps
ps3
ptp ptp_pch: Add missing #include <linux/slab.h> 2012-05-16 14:44:44 -04:00
rapidio rapidio/tsi721: fix unused variable compiler warning 2012-09-14 10:00:20 -07:00
regulator regulator: wm831x: Set the new rather than old value for DVS VSEL 2013-01-17 08:50:41 -08:00
remoteproc remoteproc: fix a potential NULL-dereference on cleanup 2012-10-07 08:32:28 -07:00
rpmsg rpmsg: fix dependency on initialization order 2012-07-19 08:58:57 -07:00
rtc drivers/rtc/rtc-twl.c: fix missing device_init_wakeup() when booted with device tree 2013-06-20 11:58:43 -07:00
s390 s390/memory hotplug: prevent offline of active memory increments 2013-05-07 19:51:53 -07:00
sbus
scsi SCSI: sd: fix array cache flushing bug causing performance problems 2013-05-19 10:54:39 -07:00
sfi
sh
sn
spi spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts 2013-04-12 09:38:43 -07:00
ssb ssb: implement spurious tone avoidance 2013-04-25 21:19:55 -07:00
staging staging: vt6656: use free_netdev instead of kfree 2013-06-07 12:49:10 -07:00
target target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer() 2013-06-27 11:27:33 -07:00
tc
thermal thermal: return an error on failure to register thermal class 2013-04-12 09:38:47 -07:00
tty TTY: Fix tty miss restart after we turn off flow-control 2013-06-07 12:49:11 -07:00
uio
usb USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable 2013-06-27 11:27:33 -07:00
uwb uwb: fix error handling 2012-04-18 13:15:51 -07:00
vhost vhost/net: fix heads usage of ubuf_info 2013-03-28 12:11:54 -07:00
video fbcon: when font is freed, clear also vc_font.data 2013-05-07 19:51:53 -07:00
virt
virtio virtio: force vring descriptors to be allocated from lowmem 2013-01-11 09:06:47 -08:00
vlynq
w1 w1: fix oops when w1_search is called from netlink connector 2013-03-20 13:04:59 -07:00
watchdog hpwdt: Fix kdump issue in hpwdt 2012-10-02 10:30:08 -07:00
xen xen-pciback: rate limit error messages from xen_pcibk_enable_msi{,x}() 2013-06-13 09:45:02 -07:00
zorro
Kconfig
Makefile