Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: zram: avoid kunmap_atomic() of a NULL pointer
(cherry picked from commit c406515239376fc93a30d5d03192182160cbd3fb) 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. Change-Id: I6358b55555328a97b1b9004629b87044c0e27fdd 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]> (cherry picked from commit ba922d3)
- Loading branch information