linux/drivers
Ben Hutchings 13ffe47637 PCI: sysfs: Fix failure path for addition of "vpd" attribute
commit 0f12a4e293 upstream.

Commit 280c73d ("PCI: centralize the capabilities code in
pci-sysfs.c") changed the initialisation of the "rom" and "vpd"
attributes, and made the failure path for the "vpd" attribute
incorrect.  We must free the new attribute structure (attr), but
instead we currently free dev->vpd->attr.  That will normally be NULL,
resulting in a memory leak, but it might be a stale pointer, resulting
in a double-free.

Found by inspection; compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-23 13:16:50 -07:00
..
accessibility
acpi ACPI: EC: Add another dmi match entry for MSI hardware 2011-01-07 14:43:07 -08:00
amba
ata ahci: AHCI mode SATA patch for Intel Patsburg SATA RAID controller 2011-03-23 13:16:42 -07:00
atm solos-pci: Fix race condition in tasklet RX handling 2010-08-13 13:19:34 -07:00
auxdisplay
base firmware_class: fix memory leak - free allocated pages 2010-08-02 10:21:25 -07:00
block Fix pktcdvd ioctl dev_minor range check 2011-03-02 09:46:34 -05:00
bluetooth bluetooth: Fix missing NULL check 2010-11-22 10:47:30 -08:00
cdrom
char tpm_tis: Use timeouts returned from TPM 2011-02-17 15:37:11 -08:00
clocksource clocksource: sh_tmu: compute mult and shift before registration 2010-09-26 17:21:37 -07:00
connector
cpufreq revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)" 2010-08-02 10:21:25 -07:00
cpuidle cpuidle: Fix incorrect optimization 2010-05-12 14:57:16 -07:00
crypto crypto: padlock - Fix AES-CBC handling on odd-block-sized input 2010-12-09 13:27:10 -08:00
dca
dio
dma mv_xor: fix race in tasklet function 2011-01-07 14:43:17 -08:00
edac amd64_edac: Fix interleaving check 2011-01-07 14:43:06 -08:00
eisa
firewire firewire: ohci: fix race in AR split packet handling 2010-12-09 13:26:50 -08:00
firmware
gpio
gpu drm: fix unsigned vs signed comparison issue in modeset ctl ioctl. 2011-03-07 15:17:52 -08:00
hid HID: add support for Acan FG-8100 barcode reader 2011-03-07 15:17:56 -08:00
hwmon hwmon/f71882fg: Set platform drvdata to NULL later 2011-03-23 13:16:36 -07:00
i2c i2c: Unregister dummy devices last on adapter removal 2011-02-17 15:37:03 -08:00
ide ide-cd: Do not access completed requests in the irq handler 2010-08-13 13:19:36 -07:00
idle
ieee1394
ieee802154
infiniband IB/cm: Bump reference count on cm_id before invoking callback 2011-03-23 13:16:43 -07:00
input input: bcm5974: Add support for MacBookAir3 2011-02-17 15:36:59 -08:00
isdn isdn: hisax: Replace the bogus access to irq stats 2011-03-02 09:46:41 -05:00
leds
lguest
macintosh
mca
md md: correctly handle probe of an 'mdp' device. 2011-03-02 09:47:05 -05:00
media radio-aimslab.c needs #include <linux/delay.h> 2011-03-02 09:46:52 -05:00
memstick memstick: fix hangs on unexpected device removal in mspro_blk 2010-08-26 16:41:32 -07:00
message mptfusion: Fix Incorrect return value in mptscsih_dev_reset 2011-03-02 09:46:33 -05:00
mfd mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo 2011-03-07 15:17:53 -08:00
misc x86: uv: xpc NULL deref when mesq becomes empty 2010-12-09 13:27:15 -08:00
mmc mmc: sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-10-28 21:43:55 -07:00
mtd mtd: add "platform:" prefix for platform modalias 2011-03-23 13:16:37 -07:00
net ath9k_hw: Fix incorrect macversion and macrev checks 2011-03-23 13:16:45 -07:00
nubus
of
oprofile oprofile: fix crash when accessing freed task structs 2010-09-20 13:17:50 -07:00
parisc PARISC: led.c - fix potential stack overflow in led_proc_write() 2010-08-10 10:20:37 -07:00
parport
pci PCI: sysfs: Fix failure path for addition of "vpd" attribute 2011-03-23 13:16:50 -07:00
pcmcia pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq 2010-08-26 16:41:53 -07:00
platform platform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files 2011-03-02 09:46:55 -05:00
pnp
power ds2760_battery: Fix calculation of time_to_empty_now 2011-02-17 15:37:02 -08:00
pps
ps3
rapidio
regulator
rtc rtc-cmos: fix suspend/resume 2011-02-17 15:37:00 -08:00
s390 keyboard: integer underflow bug 2011-03-14 14:29:53 -07:00
sbus
scsi scsi_dh_alua: Add IBM Power Virtual SCSI ALUA device to dev list 2011-03-02 09:46:43 -05:00
serial serial: unbreak billionton CF card 2011-02-17 15:37:03 -08:00
sfi
sh
sn
spi
ssb ssb: b43-pci-bridge: Add new vendor for BCM4318 2010-12-09 13:26:41 -08:00
staging Staging: comedi: jr3_pci: Don't ioremap too much space. Check result. 2011-03-14 14:29:59 -07:00
tc
telephony
thermal
uio
usb xhci: Fix cycle bit calculation during stall handling. 2011-03-23 13:16:47 -07:00
uwb
video efifb: support the EFI framebuffer on more Apple hardware 2010-12-09 13:27:08 -08:00
virtio virtio: set pci bus master enable bit 2011-03-07 15:17:55 -08:00
vlynq
w1 w1: w1 temp: fix negative termperature calculation 2010-05-12 14:57:00 -07:00
watchdog
xen xen: ensure that all event channels start off bound to VCPU 0 2010-12-09 13:26:42 -08:00
zorro
Kconfig
Makefile virtio: initialize earlier 2010-05-12 14:57:15 -07:00