linux-kernelorg-stable/drivers
Pan Bian fca0ca95c3 usb: return correct errno code when krealloc fails
In function wusb_dev_sec_add(), variable result takes the return value.
Its value should be negative on failures. When function krealloc() is
called, an earlier check of variable result guarantees that the value of
result must not be less than "sizeof(*secd)", and result is not
reassigned when krealloc() returns a NULL pointer. As a result, a
positive value may be returned, which makes it impossible for the caller
of wusb_dev_sec_add() to detect the error. This patch fixes the bug by
assigning -ENOMEM to result when krealloc() returns NULL.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29 17:36:43 +01:00
..
accessibility
acpi Merge branches 'acpi-sleep-fixes' and 'acpi-wdat-fixes' 2016-11-25 22:24:07 +01:00
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char ipmi/bt-bmc: change compatible node to 'aspeed, ast2400-ibt-bmc' 2016-11-17 16:31:09 -08:00
clk Allwinner clock fixes for 4.9 2016-11-16 11:10:58 -08:00
clocksource
connector
cpufreq
cpuidle
crypto crypto: caam - fix type mismatch warning 2016-11-17 22:14:21 +08:00
dax device-dax: fail all private mapping attempts 2016-11-16 09:00:38 -08:00
dca
devfreq
dio
dma dmaengine: cppi41: More PM runtime fixes 2016-11-17 16:09:23 +05:30
dma-buf
edac
eisa
extcon extcon: usb-gpio: Add VBUS detection support 2016-11-20 21:22:39 +09:00
firewire
firmware
fmc
fpga
gpio gpio: Remove GPIO_DEVRES option 2016-11-16 20:46:32 +01:00
gpu Merge branch 'mediatek-drm-fixes-2016-11-24' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes 2016-11-25 14:21:26 +10:00
hid HID: hid-sensor-hub: clear memory to avoid random data 2016-11-23 17:54:58 +01:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c Revert "i2c: designware: do not disable adapter after transfer" 2016-11-25 23:23:25 +01:00
ide
idle
iio
infiniband First round of -rc fixes 2016-11-17 13:53:02 -08:00
input
iommu Merge git://git.infradead.org/intel-iommu 2016-11-27 08:24:46 -08:00
ipack
irqchip
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media Merge 4.9-rc7 into usb-next 2016-11-28 08:34:10 +01:00
memory
memstick
message
mfd mfd: wm8994-core: Don't use managed regulator bulk get API 2016-11-25 11:10:55 +00:00
misc
mmc mmc: dw_mmc: fix the error handling for dma operation 2016-11-21 11:08:28 +01:00
mtd
net mvpp2: use correct size for memset 2016-11-25 20:57:21 -05:00
nfc
ntb
nubus
nvdimm
nvme nvme/pci: Don't free queues on error 2016-11-16 12:39:57 -07:00
nvmem
of of_mdio: fix device reference leak in of_phy_find_device 2016-11-17 12:05:04 -05:00
oprofile
parisc
parport
pci
pcmcia
perf
phy phy: for 4.10 2016-11-28 08:44:54 +01:00
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20161121 2016-11-22 13:48:05 -08:00
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
thermal thermal/powerclamp: add back module device table 2016-11-21 20:54:40 +08:00
thunderbolt
tty
uio
usb usb: return correct errno code when krealloc fails 2016-11-29 17:36:43 +01:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog Merge branches 'acpi-sleep-fixes' and 'acpi-wdat-fixes' 2016-11-25 22:24:07 +01:00
xen
zorro
Kconfig
Makefile