linux/drivers/staging
Ian Abbott 2db012bd40 staging: comedi: amplc_pc236: fix possible NULL deref during detach
`pc236_detach()` is called by the comedi core to clean up if either
`pc236_attach()` or `pc236_attach_pci()` returns an error.  It sets
`thisboard` to the return value of `comedi_board(dev)` and assumes it is
non-null.  This is a valid assumption if `pc236_attach()` fails, but not
if `pc236_attach_pci()` fails, leading to a possible NULL pointer
dereference.

Check `thisboard` at the top of `pc236_detach()` and return early if it
is `NULL`.  This is okay because the only other thing that could have
been allocated is `dev->private` and that is freed by the comedi core,
not by this function.

Cc: <stable@vger.kernel.org> # 3.6.x
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 11:46:35 -07:00
..
android mm: kill vma flag VM_CAN_NONLINEAR 2012-10-09 16:22:17 +09:00
asus_oled Staging: asus_oled: Add suspend/resume callbacks 2012-09-04 13:12:13 -07:00
bcm Staging: bcm: Remove typedef for _stCPacketClassificationRuleSI and call directly. 2012-09-26 09:31:52 -07:00
ccg Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
ced1401 staging:ced1401: remove read write callbacks from fops 2012-09-21 08:56:41 -07:00
comedi staging: comedi: amplc_pc236: fix possible NULL deref during detach 2012-10-22 11:46:35 -07:00
cptm1217 staging: cptm1217: use module_i2c_driver macro 2012-09-04 14:23:33 -07:00
crystalhd drivers/staging/crystalhd/crystalhd_lnx.c: adjust inconsistent IS_ERR and PTR_ERR 2012-09-04 14:22:48 -07:00
csr staging: Fix spelling of "asynchronous" in comments. 2012-09-21 08:56:41 -07:00
cxt1e1 staging: cxt1e1: solve coding style problem 2012-09-04 14:27:42 -07:00
dgrp userns: Fix build of drivers/staging/dgrp 2012-10-03 09:52:08 -07:00
echo
et131x Staging tree update for 3.7-rc1 2012-10-01 12:11:39 -07:00
frontier
ft1000 staging: ft1000: replace c99 comments with c88 2012-09-17 05:31:32 -07:00
gdm72xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
iio staging:iio:adis16400: Fixup adis16336 temp channel attributes 2012-10-19 16:23:34 +01:00
imx-drm staging: drm/imx: Add TODO 2012-09-21 09:17:07 -07:00
ipack TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
keucr USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
line6 staging: line6: variax.c: Eliminated remaining strict_stroul()s 2012-08-14 16:46:34 -07:00
media [media] v4l2: make vidioc_s_crop const 2012-09-26 11:02:25 -03:00
net
nvec Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
octeon
olpc_dcon staging/olpc_dcon: fix checkpatch warnings 2012-08-17 09:45:37 -07:00
omap-thermal Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux into thermal 2012-10-09 01:35:52 -04:00
omapdrm fbdev updates for 3.7 2012-10-12 10:21:02 +09:00
ozwpan staging: ozwpan: compare pointer to NULL rather than 0 2012-09-19 09:28:14 +01:00
panel staging: Fix misspellings of "whether". 2012-09-21 08:56:40 -07:00
phison
quickstart
ramster staging: ramster: fix build warnings 2012-09-07 22:05:03 -07:00
rtl8187se staging: rtl8187se: using random_ether_addr() to generate random MAC 2012-09-04 14:10:08 -07:00
rtl8192e Staging tree update for 3.7-rc1 2012-10-01 12:11:39 -07:00
rtl8192u staging: Fix misspellings of "whether". 2012-09-21 08:56:40 -07:00
rtl8712 staging: r8712u: Do not queue cloned skb 2012-09-26 13:05:50 -07:00
rts5139 staging: rts5139: use kzalloc() to close an info leak 2012-09-26 09:19:50 -07:00
rts_pstor staging/rts_pstor: Delete some lines (dev_info() and dev_err()) in rtsx.c 2012-09-21 08:56:41 -07:00
sbe-2t3e3 staging: sbe-2t3e3: fix error handling in t3e3_init_channel() 2012-09-25 15:48:25 -07:00
sep Staging: sep: Correct misspelled "remap_page_range" -> "remap_pfn_range" 2012-09-04 14:27:41 -07:00
serqt_usb2 USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
silicom staging: fix silicom dependencies and build errors 2012-09-21 08:56:40 -07:00
slicoss staging: slicoss: fix a null deref when pci_alloc_consistent fail 2012-09-05 11:59:51 -07:00
sm7xxfb staging: sm7xxfb: remove smtc_VRAMBaseAddress 2012-09-17 14:57:53 -07:00
speakup TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
ste_rmi4 staging: ste_rmi4: remove gpio.h include 2012-09-14 09:21:56 -05:00
telephony staging: Fix spelling of "asynchronous" in comments. 2012-09-21 08:56:41 -07:00
tidspbridge mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
usbip USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
vme staging/vme: Use pr_ printks in vme_pio2_core.c 2012-09-04 13:22:48 -07:00
vt6655 staging: vt6655: vt6655_init_info function must be void type 2012-09-07 22:07:37 -07:00
vt6656 Merge 3.6-rc6 into staging-next 2012-09-16 17:17:25 -07:00
winbond Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
wlags49_h2 staging: "wlags49_h2" Fix typos. 2012-09-10 20:24:01 -07:00
wlags49_h25 staging: "wlags49_h25" Fix typos. 2012-09-17 14:50:33 -07:00
wlan-ng staging "wlan-ng" Fix typos. 2012-09-26 09:19:50 -07:00
xgifb staging: xgifb: delete bogus video RAM configuration 2012-09-13 20:41:57 -07:00
zcache Merge 3.6-rc6 into staging-next 2012-09-16 17:17:25 -07:00
zram
zsmalloc zsmalloc: collapse internal .h into .c 2012-08-13 19:34:24 -07:00
Kconfig TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
Makefile TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
staging.c