linux/drivers/block/zram
Weijie Yang 340eb9b208 zram: avoid kunmap_atomic() of a NULL pointer
commit c406515239 upstream.

zram could kunmap_atomic() a NULL pointer in a rare situation: a zram
page becomes a full-zeroed page after a partial write io.  The current
code doesn't handle this case and performs kunmap_atomic() on a NULL
pointer, which panics the kernel.

This patch fixes this issue.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Weijie Yang <weijie.yang.kh@gmail.com>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-11-21 09:23:00 -08:00
..
Kconfig zram: remove old private project comment 2014-01-30 16:56:55 -08:00
Makefile zram: promote zram from staging 2014-01-30 16:56:55 -08:00
zram_drv.c zram: avoid kunmap_atomic() of a NULL pointer 2014-11-21 09:23:00 -08:00
zram_drv.h zram: remove zram->lock in read path and change it with mutex 2014-01-30 16:56:56 -08:00