Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp383647imm; Tue, 15 May 2018 03:12:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoCfAuUux+q3O6Lo8pq6q/XgtceBkL8GaKvNgaNkOTYioViOIP9yOsstHhcxhiDyqpWMY2L X-Received: by 2002:a17:902:aa95:: with SMTP id d21-v6mr13659322plr.73.1526379149066; Tue, 15 May 2018 03:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526379149; cv=none; d=google.com; s=arc-20160816; b=E+Id9EWaM+mY59qlsmRMRyTgo4ZFeKJ3z/Aa5OZU2Gr9ERWZh5MwPvaVaTZK3bI+H9 4F+V9xCscuZweYHIXhj/4y6gh1scboBAHCj2wZ16DkSim8DFu9Viu5JPVnTfvi157iiJ fX8oixHWe86fo+3fZUE8yP54X7tfSNtLyWNiSbSXApH58h+FEPiAhBeRk1QH8L193wMt SOp9bDdoPhRSI4SMSBWJg4a3YQfbbr+JyfQmfCXzKbRA2+O77u/1xQfYg99/1Sy5KYgl Xa/4Ly6cp1Us6w/2LtGYdzIgiZjXpjCPxW+OcQEbwT7uE3Kk5enBj79ro4eA+qBWM6ku JT1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=5Yp27dht6KggF3HYIMXu9evWjHBhZLCzrgNB6qmHE6w=; b=Cv5DWewCyA2itCZaHMY6naap/Mcqfw/VLsr0pUKGKLAKkzXacySXrsvjyOoHpaMe7F z6/SmOCVQSkcIfXASun8t5URNsKdIMA40M1GJaPUCJSC4MCqrgAkJVBZa6qsZCRAzPjp uS/Kr3647G1tfSTPc952+F+uiF2GKld9zaJDV0jkq/q3zk/1c8fVPtGA/4MwzvnRu5pT xwHT+8qsei6ipeZCFHXEHRjzjVkEtacztcBWYyjgUhPOjqbRJAbtfWsPj3GfpsY1sHR5 xe9MgTQIDTo7mcNUWapMjyL5ZKgQvsQYUYj3n71/d1JpByXeAChFwROt7jmaRpXdbLvz ki5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd8-v6si5198904plb.559.2018.05.15.03.12.14; Tue, 15 May 2018 03:12:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbeEOKLu (ORCPT + 99 others); Tue, 15 May 2018 06:11:50 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:26336 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404AbeEOKLt (ORCPT ); Tue, 15 May 2018 06:11:49 -0400 Received: from fsav102.sakura.ne.jp (fsav102.sakura.ne.jp [27.133.134.229]) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w4FAB6Fs072675; Tue, 15 May 2018 19:11:06 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav102.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav102.sakura.ne.jp); Tue, 15 May 2018 19:11:06 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav102.sakura.ne.jp) Received: from [192.168.1.8] (softbank126074194044.bbtec.net [126.74.194.44]) (authenticated bits=0) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w4FAB6SM072670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 May 2018 19:11:06 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Subject: [PATCH] hfsplus: stop workqueue when fill_super() failed To: syzbot , syzkaller-bugs@googlegroups.com, Al Viro References: <089e08e567a5b24ae90568bb75d6@google.com> Cc: akpm@linux-foundation.org, dhowells@redhat.com, ernesto.mnd.fernandez@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, slava@dubeyko.com From: Tetsuo Handa Message-ID: <964a8b27-cd69-357c-fe78-76b066056201@I-love.SAKURA.ne.jp> Date: Tue, 15 May 2018 19:11:06 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <089e08e567a5b24ae90568bb75d6@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From ffd64dcf946502e7bb1d23c021ee9a4fc92f9312 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Tue, 15 May 2018 12:23:03 +0900 Subject: [PATCH] hfsplus: stop workqueue when fill_super() failed syzbot is reporting ODEBUG messages at hfsplus_fill_super() [1]. This is because hfsplus_fill_super() forgot to call cancel_delayed_work_sync(). As far as I can see, it is hfsplus_mark_mdb_dirty() from hfsplus_new_inode() in hfsplus_fill_super() that calls queue_delayed_work(). Therefore, I assume that hfsplus_new_inode() does not fail if queue_delayed_work() was called, and the out_put_hidden_dir label is the appropriate location to call cancel_delayed_work_sync(). [1] https://syzkaller.appspot.com/bug?id=a66f45e96fdbeb76b796bf46eb25ea878c42a6c9 Signed-off-by: Tetsuo Handa Reported-by: syzbot Cc: Al Viro --- fs/hfsplus/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 9e690ae..80abba5 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -590,6 +590,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) return 0; out_put_hidden_dir: + cancel_delayed_work_sync(&sbi->sync_work); iput(sbi->hidden_dir); out_put_root: dput(sb->s_root); -- 1.8.3.1