Re: [PATCH] zram: fix random data read

From: Nitin Gupta
Date: Fri Jun 08 2012 - 03:23:37 EST


On 06/07/2012 11:39 PM, Minchan Kim wrote:

> fd1a30de makes a bug that it uses (struct page *) as zsmalloc's handle
> although it's a uncompressed page so that it can access random page,
> return random data or even crashed by get_first_page in zs_map_object.
>
> Cc: Nitin Gupta <ngupta@xxxxxxxxxx>
> Cc: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>
> Cc: Jerome Marchand <jmarchan@xxxxxxxxxx>
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
> ---
> drivers/staging/zram/zram_drv.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>


Great catch! The problem goes away after your next patch for using
zsmalloc for all the cases, still this fix can never hurt.

Acked-by: Nitin Gupta <ngupta@xxxxxxxxxx>


Thanks,
Nitin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/