linux-stable/drivers
durgadoss.r@intel.com 732e4c8db9 Thermal: Check for validity before doing kfree
The thermal_release function is called whenever
any device belonging to 'thermal' class unregisters.
This function performs kfree(cdev) without any check.
In cases where there are more device registrations
other than just 'thermal_zone' and 'cooling_device'
this might accidently free memory allocated them
silently; and cause memory errors.

This patch changes this behavior by doing
kfree(cdev) only when the device pointer belongs
to a real cdev i.e. cooling_device.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-10-14 13:11:09 +08:00
..
accessibility
acpi ACPI/thermal : Remove zone disabled warning 2013-09-30 13:39:50 +08:00
amba
ata
atm atm: nicstar: fix regression made by previous patch 2013-09-15 22:18:55 -04:00
auxdisplay
base thp: account anon transparent huge pages into NR_ANON_PAGES 2013-09-12 15:38:03 -07:00
bcma
block cciss: fix info leak in cciss_ioctl32_passthru() 2013-09-24 17:00:26 -07:00
bluetooth
bus
cdrom
char Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
clk
clocksource Merge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-09-16 16:10:26 -04:00
connector
cpufreq cpufreq: return EEXIST instead of EBUSY for second registering 2013-09-20 00:37:10 +02:00
cpuidle ACPI and power management fixes for 3.12-rc1 2013-09-12 11:22:45 -07:00
crypto
dca
devfreq
dio
dma Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
edac
eisa
extcon
firewire
firmware
fmc
gpio Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
gpu drm/i2c: tda998x: fix audio muting 2013-09-24 09:41:18 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-09-17 21:54:05 -04:00
hsi
hv
hwmon hwmon: (k10temp) remove unnecessary pci_set_drvdata() 2013-09-12 08:17:40 -07:00
hwspinlock
i2c Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ide
idle
iio iio:buffer_cb: Add missing iio_buffer_init() 2013-09-21 12:52:50 +01:00
infiniband Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-09-15 07:13:39 -04:00
iommu IOMMU Updates for Linux v3.12 2013-09-12 11:29:26 -07:00
ipack
irqchip
isdn isdn: hfcpci_softirq: get func return to suppress compiler warning 2013-09-15 22:27:04 -04:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2013-09-12 11:35:33 -07:00
lguest
macintosh
mailbox mailbox: remove unnecessary platform_set_drvdata() 2013-09-18 12:02:00 -07:00
md bcache: Fix flushes in writeback mode 2013-09-24 14:41:43 -07:00
media Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
memory
memstick memstick: add support for legacy memorysticks 2013-09-11 15:59:35 -07:00
message
mfd Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
misc Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
mmc Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
mtd mtd: nand: pxa3xx: Remove unneeded ifdef CONFIG_OF 2013-09-17 09:08:14 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-09-19 13:57:28 -05:00
nfc
ntb
nubus
of Merge branch 'for-v3.12-fix' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2013-09-11 19:11:59 -07:00
oprofile
parisc
parport
pci PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup 2013-09-20 00:24:43 +02:00
pcmcia
pinctrl
platform Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2013-09-15 17:42:59 -04:00
pnp
power Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
pps Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ps3
ptp
pwm
rapidio
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-09-19 13:57:28 -05:00
sfi
sh
sn
spi Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ssb
staging staging: iio: ade7854-spi: Fix return value 2013-09-18 19:43:33 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-09-12 16:11:45 -07:00
tc
thermal Thermal: Check for validity before doing kfree 2013-10-14 13:11:09 +08:00
tty tty: disassociate_ctty() sends the extra SIGCONT 2013-09-17 21:53:32 -04:00
uio
usb usb: fixes for v3.12-rc2 2013-09-17 13:00:43 -07:00
uwb
vfio
vhost vhost-scsi: whitespace tweak 2013-09-17 22:56:09 +03:00
video Bye, bye, WfW flag 2013-09-11 19:55:12 -07:00
virt
virtio
vlynq
vme
w1 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
watchdog Merge git://www.linux-watchdog.org/linux-watchdog 2013-09-12 08:45:53 -07:00
xen Bug-fixes: 2013-09-12 11:28:24 -07:00
zorro
Kconfig
Makefile