projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ff2ea7
)
ext4: Add error checking to kmem_cache_alloc() call in ext4_free_blocks()
author
Theodore Ts'o
<tytso@mit.edu>
Mon, 20 Dec 2010 12:26:59 +0000
(07:26 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 20 Dec 2010 12:26:59 +0000
(07:26 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/mballoc.c
b/fs/ext4/mballoc.c
index 731b6f738a035a8fa893615d7fb2e285cc3d3c8c..46d5414f59c10b5e2820914f3688ba21ecdeb4e6 100644
(file)
--- a/
fs/ext4/mballoc.c
+++ b/
fs/ext4/mballoc.c
@@
-4626,7
+4626,11
@@
do_more:
* blocks being freed are metadata. these blocks shouldn't
* be used until this transaction is committed
*/
- new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS);
+ new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS);
+ if (!new_entry) {
+ err = -ENOMEM;
+ goto error_return;
+ }
new_entry->start_blk = bit;
new_entry->group = block_group;
new_entry->count = count;