zram: avoid kunmap_atomic() of a NULL pointer
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 <email@example.com>
Cc: Sergey Senozhatsky <firstname.lastname@example.org>
Cc: Dan Streetman <email@example.com>
Cc: Nitin Gupta <firstname.lastname@example.org>
Cc: Weijie Yang <email@example.com>
Acked-by: Jerome Marchand <firstname.lastname@example.org>
Signed-off-by: Andrew Morton <email@example.com>
Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
1 file changed