linux/drivers/staging
Anton Vorontsov 484dd30e01 persistent_ram: Fix buffer size clamping during writes
This is a longstanding bug, almost unnoticeable when calling
persistent_ram_write() for small buffers.

But when called for large data buffers, the write routine behaves
incorrectly, as the size may never update: instead of clamping
the size to the maximum buffer size, buffer_size_add_clamp() returns
an error (which is never checked by the write routine, btw).

To fix this, we now use buffer_size_add() that actually clamps the
size to the max value.

Also remove buffer_size_add_clamp(), it is no longer needed.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Colin Cross <ccross@android.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14 08:54:23 -07:00
..
android persistent_ram: Fix buffer size clamping during writes 2012-05-14 08:54:23 -07:00
asus_oled staging: asus_oled.c: remove err() usage 2012-04-23 16:45:54 -07:00
bcm staging: replace open-coded ARRAY_SIZEs 2012-04-10 15:25:55 -07:00
comedi staging: comedi: refactor sysfs files in comedi_fops.c 2012-05-09 13:39:33 -07:00
cptm1217
crystalhd Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cxt1e1
echo
et131x staging: et131x: Fix coding style issues 2012-05-01 21:48:44 -07:00
frontier staging: frontier: alphatrack.c: remove err() usage 2012-04-23 16:46:11 -07:00
ft1000 Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
iio staging: iio: Fix typo in iio 2012-05-08 16:04:12 -07:00
ipack Staging: ipack: dereferencing freed memory 2012-05-10 09:50:12 -07:00
keucr USB merge for 3.4-rc1 2012-03-20 11:26:30 -07:00
line6 staging: line6/pcm.c: Removed trailing whitespace 2012-05-09 13:49:40 -07:00
media Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
net NET: pc300, move to staging as it is broken 2012-04-13 10:57:04 -07:00
nvec staging:nvec:nvec.h Fix typos in staging:nvec 2012-04-10 09:29:21 -07:00
octeon Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
olpc_dcon staging: olpc_dcon.c: Remove a few spaces between casts and variables 2012-04-24 11:33:22 -07:00
omapdrm Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
ozwpan Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
panel staging:panel:panel.c Fix typo in staging:panel 2012-04-10 09:29:21 -07:00
phison
quatech_usb2 Staging: quatech_usb3: remove err() usage 2012-04-24 09:04:42 -07:00
quickstart
ramster staging: ramster: depend on NET for sock_* functions 2012-05-08 16:05:28 -07:00
rtl8187se staging: Remove test of is_broadcast with is_multicast 2012-05-09 13:52:23 -07:00
rtl8192e staging: Remove test of is_broadcast with is_multicast 2012-05-09 13:52:23 -07:00
rtl8192u staging: Remove test of is_broadcast with is_multicast 2012-05-09 13:52:23 -07:00
rtl8712 staging: delete all duplicated endian crap from rtl8712 driver 2012-05-10 13:10:03 -04:00
rts5139 staging: rts5139: remove unused variable option.ww_enable 2012-05-10 09:57:21 -07:00
rts_pstor Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
sbe-2t3e3 Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sep Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
serqt_usb2 Staging: serqt_usb2: remove err() usage 2012-04-24 09:05:21 -07:00
slicoss
sm7xx staging: sm7xx: rename function 2012-04-29 21:32:20 -04:00
speakup TTY: speakup, do not use serialP 2012-03-08 11:47:02 -08:00
ste_rmi4 ARM: More device tree support updates 2012-03-28 12:34:33 -07:00
telephony staging/telephony/ixj.c: delete trailing whitespace 2012-04-10 10:27:58 -07:00
tidspbridge Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
usbip staging: Fix typo in multiple files 2012-04-10 10:31:01 -07:00
vme Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
vt6655 Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
vt6656 staging: Remove test of is_broadcast with is_multicast 2012-05-09 13:52:23 -07:00
winbond
wlags49_h2 staging: wlags49_h2: Fix spelling Endianess to Endianness in wlags49_h2 2012-05-09 13:47:16 -07:00
wlags49_h25
wlan-ng staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential memory leak. 2012-04-24 11:28:25 -07:00
xgifb Merge 3.4-rc5 into staging-next 2012-05-02 11:48:07 -07:00
zcache staging: zcache: fix Kconfig crypto dependency 2012-04-24 11:57:36 -07:00
zram Merge branch 'kmap_atomic' of git://github.com/congwang/linux 2012-03-21 09:40:26 -07:00
zsmalloc staging: zsmalloc: add/fix function comment 2012-05-09 13:20:22 -07:00
Kconfig Staging: IndustryPack bus for the Linux Kernel 2012-05-09 14:05:45 -07:00
Makefile Staging: IndustryPack bus for the Linux Kernel 2012-05-09 14:05:45 -07:00
staging.c