projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5c13f9
)
btrfs: avoid NULL deref in btrfs_reserve_extent with DEBUG_ENOSPC
author
Jeff Mahoney
<jeffm@suse.com>
Thu, 1 Mar 2012 13:56:28 +0000
(14:56 +0100)
committer
David Sterba
<dsterba@suse.cz>
Thu, 22 Mar 2012 00:45:32 +0000
(
01:45
+0100)
__find_space_info can return NULL but we don't check it before calling
dump_space_info().
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
fs/btrfs/extent-tree.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index
37e0a80
..
c32a9bf
100644
(file)
--- a/
fs/btrfs/extent-tree.c
+++ b/
fs/btrfs/extent-tree.c
@@
-5838,7
+5838,8
@@
again:
printk(KERN_ERR "btrfs allocation failed flags %llu, "
"wanted %llu\n", (unsigned long long)data,
(unsigned long long)num_bytes);
- dump_space_info(sinfo, num_bytes, 1);
+ if (sinfo)
+ dump_space_info(sinfo, num_bytes, 1);
}
}