projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1b075d
)
Btrfs: avoid NULL pointer deref in try_release_extent_buffer
author
Chris Mason
<chris.mason@oracle.com>
Mon, 22 Nov 2010 03:27:44 +0000
(22:27 -0500)
committer
Chris Mason
<chris.mason@oracle.com>
Mon, 22 Nov 2010 03:27:44 +0000
(22:27 -0500)
If we fail to find a pointer in the radix tree, don't try
to deref the NULL one we do have.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_io.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/extent_io.c
b/fs/btrfs/extent_io.c
index f60aa3c35c23340833351d99e17632cb06c92f6c..143d3f541d6415bec2e9c62d213b9419317130b0 100644
(file)
--- a/
fs/btrfs/extent_io.c
+++ b/
fs/btrfs/extent_io.c
@@
-3837,8
+3837,10
@@
int try_release_extent_buffer(struct extent_io_tree *tree, struct page *page)
spin_lock(&tree->buffer_lock);
eb = radix_tree_lookup(&tree->buffer, start >> PAGE_CACHE_SHIFT);
- if (!eb)
- goto out;
+ if (!eb) {
+ spin_unlock(&tree->buffer_lock);
+ return ret;
+ }
if (test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags)) {
ret = 0;