Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6483688rdb; Tue, 2 Jan 2024 03:42:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTCaCwgKCC3lpAyinx4vwg2PiGRFuj9Oha9s3z9TFfCOoGk10DqtCLjkpva8RiW6onxtq6 X-Received: by 2002:a17:907:1b1e:b0:a23:49c4:3e89 with SMTP id mp30-20020a1709071b1e00b00a2349c43e89mr19847766ejc.10.1704195771764; Tue, 02 Jan 2024 03:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704195771; cv=none; d=google.com; s=arc-20160816; b=fZdmUTstKIONun4OD/OdStYUp7jI1VLlwqUrta3Ukzjj6rq4rg2hg5vetToWu/YraX HbdgjXBm7PiUkQ4+r/XJo4wSvQB4l+q7Kj41GfxspNiCjDQSYKPAaLVtmiTIyHSZ0cYD W/IX0cDZO+ddJOGwNCF0szj+vEk+0Jgdt/WBYsbu5isE+LjMvD4KwpDO3Wgf7j0BQlS3 LAon9Se2NRIJDekD4xopMrfZ39bbZLYHG9rf3W4a6Ksf0f1jXjrDXRCXWyl6t+S2pxsS 2IbMvCk/2Bojq1uIxAYuHRhbuWzrFK5gjM1+dV7m9EwOwK36Ua2yomjgirXSSeDeqoKp ee5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=oEZhMRw9HdJT4A4ewTuyjJB8RjNCZNkSeMoeyQNKRcU=; fh=gi5HUAUwr7qqN2mLUjmK0C0tw6WAdUK0h6OcbjnyZxM=; b=Im9tRVf4Y30wGRL3xbbg0avrf7muriJ5RvsPJrc/sujUIgZuc6oynIHddSQQqfDWaf v1HZ+crWoTzDTYdqI84nEoa37vtpta/ZiiYqSU09v3dfixr8ObQUqVVnldtyf17q7gj0 Q0DfCsS3GunRAzsQ0f7hWvXoNFkqnvJTj7pPsmTqLLQougnRxy0aa1u239oYpmqtiXyy 4pDWHQ5MD1I9ocq2Xf7ic8gdqTgqcEqrQ/rey4lTcLtjwAc1U7sjxeXBLHwijzp6/jRv IhDmJldme3YCGxuU9p/gw2V61AAHngCok/iXTaB8eehL8K7Afop3opBy+KMGh4ejjLSK cgxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=fjCgGpy1; spf=pass (google.com: domain of linux-kernel+bounces-14307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i21-20020a170906115500b00a1e431f49besi10040836eja.339.2024.01.02.03.42.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 03:42:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=fjCgGpy1; spf=pass (google.com: domain of linux-kernel+bounces-14307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7F50F1F2129B for ; Tue, 2 Jan 2024 11:42:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83822EADD; Tue, 2 Jan 2024 11:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="fjCgGpy1" X-Original-To: linux-kernel@vger.kernel.org Received: from out203-205-221-231.mail.qq.com (out203-205-221-231.mail.qq.com [203.205.221.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5896DEAC2 for ; Tue, 2 Jan 2024 11:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1704195452; bh=oEZhMRw9HdJT4A4ewTuyjJB8RjNCZNkSeMoeyQNKRcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fjCgGpy12WSCPVg1PksqyZ5SYTPlJa9PkMwRFGUyyzMuLfyWuWq/EsWfufzrsEmuB 7wgdtojzOTQHn395XQfy4SkW0rbgm1ghogHZMUF4zZ9tHbwAX04e9Rd1gRNYuS577r afu7QXuGMvdwah/84QzZiHFzHJExjQ5A48B0vAYs= Received: from pek-lxu-l1.wrs.com ([111.198.225.215]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id 95E93A02; Tue, 02 Jan 2024 19:37:30 +0800 X-QQ-mid: xmsmtpt1704195450tyxkjroig Message-ID: X-QQ-XMAILINFO: NvH2zBBgt3uT6SfvEicVD2L+8tzhP/HGQJrafDNfRCRQjBTdn9tbBQCJJ/6fTS IYQ1ivyaBl7pKVag5tYNGgGPOqIn1HDB896C3BD/CFOUgELsLNoZCQw6yUtxk+VKir+4fAEaI1Ts YVF4C5n6Mf+p6UEJVd7AC3TZ3cqX5mx8K2WzFTDCPJMeuT3Kor+967/zn9XBAQVS5tVGFms0FX8Z CH909PcMf3tMZdrUnZFFg+DlmycOeFiV9iUVD2K6gffwfB6bEbKx1t5z1BKEaa8Tzk9UySIV3De6 t2ljZfjHfNB9m85tzzl1JbQP42PcACsE5uvSFfoZQCdsAbCPWC1vMCTeekrd407G+kb6lZa+rEhH H++qhxgK6juYrDvwWGm1x1gr8tLjW67bU9s1+wW838l9fHQUKNTRTbyneGJlmUsparIDqjl5oKHq Ulc0z8pLFpEDBJZAovPUdfqckfBmUfmkZ0UvNNZKwZxnKebba+0fWBhMjhzobKFQrcXDJ6Omh/u2 W8MBCNCs4aUUGW88nMr6wAhqo0BNfM2FK0aNYiKJfhwoToo+aVZM1aV29vFmNBTg9Lyn6BSfJ8JK rkg9+LhUlNJ29+ndRIXJ8/vhoyuvrzfPqxo5IkXYObUJVonWW8YOGCNJmzL5fSAx7AbITUzk/iYI dnMDdh1t/kTlZZfHqU66xZqrjv8CbwIjW28cS83vFsIr3RrEXXXgUwXhAGfhH6fg6hJFrce7t+/I AP3tNJEuXv7pxNa+g343MpgVrVSGLYiYIep/tRSNOPlLNf/bmUgq0aYVDza11QDq2I2+cvYdvTU8 XXasMsGdL6BrQacjwRznoAovPEOqnKtLFQoH6VTwtGah+vPa9ozoCMLOb6QmdAmR00qymh+EtzDV Sjulkb4bNb4mIiiJCMV8XOiMtidad+DMdHxZsYNSP8JlZWsXawvk4b6tuX7EblhyCJ0+PATieo X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk= From: Edward Adam Davis To: syzbot+41a88b825a315aac2254@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [hfs?] possible deadlock in hfs_extend_file (2) Date: Tue, 2 Jan 2024 19:37:31 +0800 X-OQ-MSGID: <20240102113730.1515754-2-eadavis@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <0000000000004efa57060def87be@google.com> References: <0000000000004efa57060def87be@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit please test possible deadlock in hfs_extend_file #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 610a9b8f49fb diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c index 6d1878b99b30..1b02c7b6a10c 100644 --- a/fs/hfs/extent.c +++ b/fs/hfs/extent.c @@ -197,6 +197,10 @@ static int hfs_ext_read_extent(struct inode *inode, u16 block) block < HFS_I(inode)->cached_start + HFS_I(inode)->cached_blocks) return 0; + if (HFS_I(inode)->flags & HFS_FLG_EXT_DIRTY && + HFS_I(inode)->flags & HFS_FLG_EXT_NEW) + return -ENOENT; + res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); if (!res) { res = __hfs_ext_cache_extent(&fd, inode, block);