diff options
author | Luis Henriques <luis.henriques@canonical.com> | 2015-09-17 16:01:40 -0700 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-06-13 14:47:42 +1000 |
commit | 6726c46cea51720ece973296c30b2b57e209a14b (patch) | |
tree | 3aa353437cefb5edad7b6be966fac0427c11363f /arch/arm/configs/cyanogenmod_i9100_defconfig | |
parent | 3053323261efed3e9000998136e86f007b52ba73 (diff) | |
download | kernel_samsung_smdk4412-6726c46cea51720ece973296c30b2b57e209a14b.zip kernel_samsung_smdk4412-6726c46cea51720ece973296c30b2b57e209a14b.tar.gz kernel_samsung_smdk4412-6726c46cea51720ece973296c30b2b57e209a14b.tar.bz2 |
zram: fix possible use after free in zcomp_create()
zcomp_create() verifies the success of zcomp_strm_{multi,single}_create()
through comp->stream, which can potentially be pointing to memory that
was freed if these functions returned an error.
While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create()
could return other error codes. Function documentation updated
accordingly.
Change-Id: I84334ce1929c8212aa70387781ef0a6b0af50fa5
Fixes: beca3ec71fe5 ("zram: add multi stream functionality")
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/configs/cyanogenmod_i9100_defconfig')
0 files changed, 0 insertions, 0 deletions