]>
Commit | Line | Data |
---|---|---|
10d555a3 GKH |
1 | From 66072c29328717072fd84aaff3e070e3f008ba77 Mon Sep 17 00:00:00 2001 |
2 | From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | |
3 | Date: Fri, 18 May 2018 16:09:16 -0700 | |
4 | Subject: hfsplus: stop workqueue when fill_super() failed | |
5 | ||
6 | From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | |
7 | ||
8 | commit 66072c29328717072fd84aaff3e070e3f008ba77 upstream. | |
9 | ||
10 | syzbot is reporting ODEBUG messages at hfsplus_fill_super() [1]. This | |
11 | is because hfsplus_fill_super() forgot to call cancel_delayed_work_sync(). | |
12 | ||
13 | As far as I can see, it is hfsplus_mark_mdb_dirty() from | |
14 | hfsplus_new_inode() in hfsplus_fill_super() that calls | |
15 | queue_delayed_work(). Therefore, I assume that hfsplus_new_inode() does | |
16 | not fail if queue_delayed_work() was called, and the out_put_hidden_dir | |
17 | label is the appropriate location to call cancel_delayed_work_sync(). | |
18 | ||
19 | [1] https://syzkaller.appspot.com/bug?id=a66f45e96fdbeb76b796bf46eb25ea878c42a6c9 | |
20 | ||
21 | Link: http://lkml.kernel.org/r/964a8b27-cd69-357c-fe78-76b066056201@I-love.SAKURA.ne.jp | |
22 | Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | |
23 | Reported-by: syzbot <syzbot+4f2e5f086147d543ab03@syzkaller.appspotmail.com> | |
24 | Cc: Al Viro <viro@zeniv.linux.org.uk> | |
25 | Cc: David Howells <dhowells@redhat.com> | |
26 | Cc: Ernesto A. Fernandez <ernesto.mnd.fernandez@gmail.com> | |
27 | Cc: Vyacheslav Dubeyko <slava@dubeyko.com> | |
28 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
29 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
30 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
31 | ||
32 | --- | |
33 | fs/hfsplus/super.c | 1 + | |
34 | 1 file changed, 1 insertion(+) | |
35 | ||
36 | --- a/fs/hfsplus/super.c | |
37 | +++ b/fs/hfsplus/super.c | |
38 | @@ -585,6 +585,7 @@ static int hfsplus_fill_super(struct sup | |
39 | return 0; | |
40 | ||
41 | out_put_hidden_dir: | |
42 | + cancel_delayed_work_sync(&sbi->sync_work); | |
43 | iput(sbi->hidden_dir); | |
44 | out_put_root: | |
45 | dput(sb->s_root); |