aboutsummaryrefslogtreecommitdiff
path: root/lib/decompress_inflate.c
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-10-30 18:36:32 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-30 09:36:53 -0700
commit46a51c80216cb891f271ad021f59009f34677499 (patch)
treead2a3d08f22a598477780baaad4eb6f7ebc38480 /lib/decompress_inflate.c
parent59d3fe540454dd8fc48d4eda44e200f9c98bef10 (diff)
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>
Diffstat (limited to 'lib/decompress_inflate.c')
0 files changed, 0 insertions, 0 deletions