Minchan Kim ae94264ed4 zram: fix null dereference of handle
In testing I found handle passed to zs_map_object in __zram_bvec_read is
NULL so eh kernel goes oops in pin_object().

The reason is there is no routine to check the slot's freeing after
getting the slot's lock.  This patch fixes it.

[minchan@kernel.org: v2]
  Link: http://lkml.kernel.org/r/1505887347-10881-1-git-send-email-minchan@kernel.org
Link: http://lkml.kernel.org/r/1505788488-26723-1-git-send-email-minchan@kernel.org
Fixes: 1f7319c74275 ("zram: partial IO refactoring")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-10-03 17:54:24 -07:00
..
2017-09-28 22:18:15 +02:00
2017-10-03 08:57:07 -07:00
2017-09-10 20:40:00 -07:00
2017-09-07 14:03:05 -07:00
2017-09-07 13:51:13 -07:00
2017-09-07 12:53:14 -07:00
2017-09-14 17:34:43 +02:00
2017-09-05 11:08:17 -07:00
2017-09-27 20:08:44 -07:00
2017-09-10 20:40:00 -07:00
2017-09-26 16:54:22 -07:00
2017-08-29 13:46:35 +02:00
2017-09-12 13:30:06 -07:00
2017-09-05 11:08:17 -07:00
2017-09-11 13:04:32 -07:00
2017-09-07 13:51:13 -07:00
2017-09-09 14:34:38 -07:00
2017-09-13 10:56:00 -07:00
2017-09-19 08:36:19 +02:00
2017-09-30 12:50:56 -07:00
2017-09-05 12:45:03 -07:00
2017-09-05 12:45:03 -07:00
2017-08-30 14:03:42 -06:00
2017-09-14 13:33:33 -07:00
2017-09-07 21:11:05 -07:00
2017-09-29 12:24:28 -07:00