linux/drivers/staging/zram
Rashika Kheria 46a51c8021 Staging: zram: Fix access of NULL pointer
This patch fixes the bug in reset_store caused by accessing NULL pointer.

The bdev gets its value from bdget_disk() which could fail when memory
pressure is severe and hence can return NULL because allocation of
inode in bdget could fail.

Hence, this patch introduces a check for bdev to prevent reference to a
NULL pointer in the later part of the code. It also removes unnecessary
check of bdev for fsync_bdev().

Cc: stable <stable@vger.kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-30 09:36:53 -07:00
..
Kconfig
Makefile zram: remove zram_sysfs file (v2) 2013-06-24 15:59:03 -07:00
zram_drv.c Staging: zram: Fix access of NULL pointer 2013-10-30 09:36:53 -07:00
zram_drv.h zram: don't grab mutex in zram_slot_free_noity 2013-08-12 15:25:00 -07:00
zram.txt