kernel-fxtec-pro1x/drivers/block/zram
Luis Henriques 3aaf14da80 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.

Fixes: beca3ec71f ("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>
2015-09-17 21:16:07 -07:00
..
Kconfig zram: remove obsolete ZRAM_DEBUG option 2015-06-25 17:00:35 -07:00
Makefile
zcomp.c zram: fix possible use after free in zcomp_create() 2015-09-17 21:16:07 -07:00
zcomp.h zram: check comp algorithm availability earlier 2015-06-25 17:00:37 -07:00
zcomp_lz4.c
zcomp_lz4.h
zcomp_lzo.c
zcomp_lzo.h
zram_drv.c zram: unify error reporting 2015-09-08 15:35:28 -07:00
zram_drv.h zsmalloc/zram: introduce zs_pool_stats api 2015-09-08 15:35:28 -07:00