From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:46853 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751036AbeECWI2 (ORCPT ); Thu, 3 May 2018 18:08:28 -0400 Received: by mail-qt0-f194.google.com with SMTP id m16-v6so24977779qtg.13 for ; Thu, 03 May 2018 15:08:28 -0700 (PDT) Date: Thu, 3 May 2018 19:08:22 -0300 From: Ernesto =?utf-8?Q?A=2E_Fern=C3=A1ndez?= To: syzbot Cc: Andrew Morton , Christoph Hellwig , Alexey Khoroshilov , Artem Bityutskiy , Ernesto =?utf-8?Q?A=2E_Fern=C3=A1ndez?= , linux-fsdevel@vger.kernel.org Subject: [PATCH 1/2] hfsplus: clean up delayed work if fill_super fails Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: If no hidden directory exists, the hfsplus_fill_super() function will create it. A delayed work is then queued to sync the superblock, which is never canceled in case of failure. Fix this. Fixes: 9e6c5829b07c ("hfsplus: get rid of write_super") Reported-by: syzbot+4f2e5f086147d543ab03@syzkaller.appspotmail.com Signed-off-by: Ernesto A. Fernández --- fs/hfsplus/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 513c357c734b..4bc49e3f171d 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -588,6 +588,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) return 0; out_put_hidden_dir: + /* Creating an inode queues the sb for synchronization */ + cancel_delayed_work_sync(&sbi->sync_work); iput(sbi->hidden_dir); out_put_root: dput(sb->s_root); -- 2.11.0