projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a24cd49
)
jffs2_kill_sb(): deal with failed allocations
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 3 Apr 2018 03:56:44 +0000
(23:56 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 16 Apr 2018 03:49:05 +0000
(23:49 -0400)
jffs2_fill_super() might fail to allocate jffs2_sb_info;
jffs2_kill_sb() must survive that.
Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/jffs2/super.c
patch
|
blob
|
history
diff --git
a/fs/jffs2/super.c
b/fs/jffs2/super.c
index
f60dee7
..
87bdf0f
100644
(file)
--- a/
fs/jffs2/super.c
+++ b/
fs/jffs2/super.c
@@
-342,7
+342,7
@@
static void jffs2_put_super (struct super_block *sb)
static void jffs2_kill_sb(struct super_block *sb)
{
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
- if (!sb_rdonly(sb))
+ if (
c &&
!sb_rdonly(sb))
jffs2_stop_garbage_collect_thread(c);
kill_mtd_super(sb);
kfree(c);