diff options
| author | Rashika Kheria <rashika.kheria@gmail.com> | 2013-10-30 18:36:32 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 10:42:16 -0800 |
| commit | a552be366113e2c0334034f1ee654f67eb017dc0 (patch) | |
| tree | 739f2508b7b5aaf12d7e980a0979194d2f2c88c5 /tools/perf/scripts/python | |
| parent | f30d41a69154f0397173666a10d1a9fb072317fd (diff) | |
Staging: zram: Fix access of NULL pointer
commit 46a51c80216cb891f271ad021f59009f34677499 upstream.
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().
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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
