Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Dan Streetman <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Weijie Yang <[email protected]> Acked-by: Jerome Marchand <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>