android_kernel_google_msm/drivers
Dan Carpenter 355c6a10ac mwifiex: fix mwifiex_rdeeprom_read()
commit 1f9c6e1bc1ba5f8a10fcd6e99d170954d7c6d382 upstream.

There were several bugs here.

1)  The done label was in the wrong place so we didn't copy any
    information out when there was no command given.

2)  We were using PAGE_SIZE as the size of the buffer instead of
    "PAGE_SIZE - pos".

3)  snprintf() returns the number of characters that would have been
    printed if there were enough space.  If there was not enough space
    (and we had fixed the memory corruption bug #2) then it would result
    in an information leak when we do simple_read_from_buffer().  I've
    changed it to use scnprintf() instead.

I also removed the initialization at the start of the function, because
I thought it made the code a little more clear.

Fixes: 5e6e3a92b9 ('wireless: mwifiex: initial commit for Marvell mwifiex driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-10-26 23:15:23 +08:00
..
accessibility
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-10-22 09:20:07 +08:00
amba
ata libata: increase the timeout when setting transfer mode 2016-03-21 09:17:45 +08:00
atm
auxdisplay auxdisplay: ks0108: fix refcount 2016-04-27 18:55:15 +08:00
base regmap: debugfs: Don't bother actually printing when calculating max length 2016-04-27 18:55:23 +08:00
bcma
block xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) 2016-04-27 18:55:27 +08:00
bluetooth ath3k: add support of 13d3:3474 AR3012 device 2015-10-22 09:20:03 +08:00
cdrom
char agp/intel: Fix typo in needs_ilk_vtd_wa() 2015-10-22 09:20:06 +08:00
clk
clocksource
connector
cpufreq cpufreq: speedstep-smi: enable interrupts when waiting 2015-06-19 11:40:15 +08:00
cpuidle
crypto crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer 2016-03-21 09:17:48 +08:00
dca
devfreq
dio
dma dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup 2015-10-22 09:20:04 +08:00
edac EDAC, ppc4xx: Access mci->csrows array elements properly 2016-03-21 09:17:52 +08:00
eisa
firewire firewire: cdev: prevent kernel stack leaking into ioctl arguments 2015-02-02 17:05:24 +08:00
firmware
gpio gpio: tps65912: fix wrong container_of arguments 2015-06-19 11:40:18 +08:00
gpu drm/nouveau/gem: return only valid domain when there's only one 2016-04-27 18:55:29 +08:00
hid HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-04-14 17:33:52 +08:00
hsi
hv Drivers: hv: vmbus: Don't wait after requesting offers 2015-09-18 09:20:26 +08:00
hwmon hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_div 2014-07-17 15:39:50 -07:00
hwspinlock
i2c i2c: davinci: generate STP always when NACK is received 2015-04-14 17:33:40 +08:00
ide
idle
ieee802154
infiniband IB/cm: Fix rb-tree duplicate free and use-after-free 2016-04-27 18:55:21 +08:00
input Input: usbtouchscreen - avoid unresponsive TSC-30 touch screen 2016-03-21 09:17:47 +08:00
iommu iommu/amd: Don't clear DTE flags when modifying it 2016-04-27 18:55:28 +08:00
isdn ppp, slip: Validate VJ compression slot parameters completely 2016-03-21 09:17:54 +08:00
leds
lguest lguest: fix out-by-one error in address checking. 2015-09-18 09:20:43 +08:00
macintosh windfarm: decrement client count when unregistering 2016-04-27 18:55:15 +08:00
mca
md raid1: include bio_end_io_list in nr_queued to prevent freeze_array hang 2016-04-27 18:55:30 +08:00
media rc-core: fix remove uevent generation 2016-04-27 18:55:13 +08:00
memstick memstick: mspro_block: add missing curly braces 2015-09-18 09:20:31 +08:00
message
mfd mfd: tc6393xb: Fail ohci suspend if full state restore is required 2015-04-14 17:33:43 +08:00
misc
mmc mmc: block: Add missing mmc_blk_put() in power_ro_lock_show() 2016-03-21 09:17:48 +08:00
mtd UBI: return ENOSPC if no enough space available 2016-04-27 18:55:25 +08:00
net mwifiex: fix mwifiex_rdeeprom_read() 2016-10-26 23:15:23 +08:00
nfc
nubus
of of/address: Don't loop forever in of_find_matching_node_by_address(). 2016-04-27 18:55:16 +08:00
oprofile
parisc
parport
pci PCI: Add VPD function 0 quirk for Intel Ethernet devices 2016-04-27 18:55:14 +08:00
pcmcia Disable write buffering on Toshiba ToPIC95 2015-10-22 09:20:04 +08:00
pinctrl
platform dell-laptop: Fix allocating & freeing SMI buffer page 2015-10-22 09:20:06 +08:00
pnp
power wm831x_power: Use IRQF_ONESHOT to request threaded IRQs 2016-10-26 23:15:22 +08:00
pps
ps3
ptp
rapidio rapidio/tsi721: Fix interrupt mask when handling MSI 2014-06-07 16:02:14 -07:00
regulator regulator: core: fix constraints output buffer 2015-10-22 09:20:03 +08:00
remoteproc
rpmsg
rtc drivers/rtc/rtc-pl031.c: restore ST variant functionality 2014-06-07 16:02:14 -07:00
s390 s390/3215: fix tty output containing tabs 2015-04-14 17:34:03 +08:00
sbus bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000 2014-08-14 08:42:37 +08:00
scsi mvsas: Fix NULL pointer dereference in mvs_slot_task_free 2016-04-27 18:55:29 +08:00
sfi
sh
sn
spi spi: Fix documentation of spi_alloc_master() 2016-04-27 18:55:22 +08:00
ssb
staging staging: rtl8712: prevent buffer overrun in recvbuf2recvframe 2015-10-22 09:20:02 +08:00
target target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT 2016-03-21 09:17:49 +08:00
tc
thermal
tty drivers/tty: require read access for controlling terminal 2016-04-27 18:55:26 +08:00
uio
usb usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message 2016-04-27 18:55:30 +08:00
uwb uwb: init beacon cache entry before registering uwb device 2014-12-01 18:02:28 +08:00
vhost vhost: actually track log eventfd file 2016-03-21 09:17:49 +08:00
video PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev 2015-06-19 11:40:34 +08:00
virt
virtio virtio_pci: document why we defer kfree 2015-04-14 17:33:50 +08:00
vlynq
w1
watchdog watchdog: omap: assert the counter being stopped before reprogramming 2015-10-22 09:20:06 +08:00
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-09-18 09:20:42 +08:00
zorro
Kconfig
Makefile