aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-10-30 18:36:32 +0530
committerMister Oyster <oysterized@gmail.com>2016-12-11 12:53:36 +0100
commitb4043e11c4620df054dfe89d6fbc4e7dcfadee5f (patch)
tree3d97e930a6c2e4b650edcb38e27b928d05f8e77e /include
parentb211ee8391b88c9c545599324bcba14b09db990c (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 'include')
0 files changed, 0 insertions, 0 deletions