]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
pstore: Fix buffer overflow while write offset equal to buffer size
authorLiu ShuoX <shuox.liu@intel.com>
Wed, 12 Mar 2014 13:24:44 +0000 (21:24 +0800)
committerTony Luck <tony.luck@intel.com>
Mon, 17 Mar 2014 21:14:03 +0000 (14:14 -0700)
commit017321cf390045dd4c4afc4a232995ea50bcf66d
treec7ce8487792ba20f6e07d3320e4985e331fbf921
parent34f0ec82e0a99009161a281629280cfcad187696
pstore: Fix buffer overflow while write offset equal to buffer size

In case new offset is equal to prz->buffer_size, it won't wrap at this
time and will return old(overflow) value next time.

Signed-off-by: Liu ShuoX <shuox.liu@intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/ram_core.c