diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-11 17:17:17 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-01 15:18:18 +0800 |
commit | bbe784b683f6e49bc345577fc5398344bc7c289e (patch) | |
tree | ac735304b268762174ccbbd5f0fe204e510900d4 /Documentation | |
parent | f09f8dad903d3c469bf11b49c2d4c5259906a153 (diff) |
persistent_ram: Fix buffer size clamping during writes
commit 484dd30e016eb425b0de871357fff2c9bb93be45 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions