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