From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CD013A383B for ; Mon, 13 Apr 2026 08:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776067594; cv=none; b=rWe2CbZh+ZpuUaikMj5QPsQuI6KbnjtjBI6axcg3jqpaGwkSkdirX2/7WbKTNt9dsWW6KjZdseoeZ+6tFLP2Hc4wI1jonO7Q2AoQFthDQQ5D1QAtpZ8tvV/Gn46S2K1CgfHe5MV/ehpqfnl93pBvOoQCiYMgAsIz9rt9kg/SDjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776067594; c=relaxed/simple; bh=Z8BD40eHUfu8o02GMVgRTFob0hMBBY4RRbOYIpvvqpM=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=ObTikwQao4DJgWF+DM1wiFjf8mVjlSBSfE4WHS0GFzDm8hMjAfP8vJR5+Yx3Ya2Pcrv6Kg82Ng08oWOuwUcSTxh0MIMvzIkdQAhDID58eFevvVvVHm00QAKZHtCEhq1CWhioL2yMknzhMfTgaU7ZEQ6fWAgXmO8EDxjIfwNY+Lo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-6850890ec96so3146661eaf.1 for ; Mon, 13 Apr 2026 01:06:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776067592; x=1776672392; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0x84cCokXRGrbihdwZPBR4RkIQTrCyox0UBh94JH1c8=; b=Hrmz4dmpLN+pk2mTpQ/JFoN+v/qUU2igKUJ9UySBXbIXrzZa2tpb1jsW8nv8rxNMWB 2DH8IBnzwT2319AK8GsC3CAW3K6aED/sgTksilinG1SU83UOClP+/4a5UlaWiRHRK7tS xM0vULP8nmP4jcP7tNSyzJb5UvuzzLzPoO/FyCzpuRmQJHuJXUzdeAWINBnrz5iR4Ckv XolCJml4IMoCIaTVF/Tjv4DMHf2ldM4YObVxygsndJKl3o07bRr63xrR+0v9ZvPkX0PD KrLQfM83R39el0gKN5beEAcmDN4lj6dObjl7mR6RvGGbCE20BZDJitsgWbRmxmrjth+z IArA== X-Gm-Message-State: AOJu0YzCZcPVLnZGxZPPXYL7kkrz1j+zvsCtt68Kws6bZdUwFQmPs4UR /cgNNLJFo5ccVDoJezOh+kVgkKr3x4DrBiJSXR1pLay30/OqDH18Hp6kvvvAMH6bF0dwNYMV9Ki Zz6ybfRb9dpxIiyRkrkrv+OYtGYg62OPq0LAheeDPBWud5+qkv+n692tP8nE= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:178e:b0:689:dfc8:5e3c with SMTP id 006d021491bc7-68be596a84emr6570120eaf.3.1776067591995; Mon, 13 Apr 2026 01:06:31 -0700 (PDT) Date: Mon, 13 Apr 2026 01:06:31 -0700 In-Reply-To: <68e9715b.050a0220.1186a4.000e.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69dca407.a00a0220.468cb.0044.GAE@google.com> Subject: Forwarded: Re: [syzbot] [xfs?] INFO: task hung in xlog_force_lsn (2) From: syzbot To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: Re: [syzbot] [xfs?] INFO: task hung in xlog_force_lsn (2) Author: ytohnuki@amazon.com #syz test diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index f807f8f4f705..2645052042bf 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -426,6 +426,23 @@ xlog_state_shutdown_callbacks( struct xlog_in_core *iclog; LIST_HEAD(cb_list); + /* + * Shutdown waiters on ic_force_wait do not require callback completion. + * Once log shutdown has been established, they only need to wake, + * observe xlog_is_shutdown(), and abort with -EIO. + * + * Wake them before processing callbacks to avoid deadlock if callback + * processing blocks on a buffer lock and prevents the wakeup from being + * reached. + * + * Keep ic_write_wait wakeups ordered after callback processing so + * shutdown callback side effects still complete before teardown progresses. + */ + iclog = log->l_iclog; + do { + wake_up_all(&iclog->ic_force_wait); + } while ((iclog = iclog->ic_next) != log->l_iclog); + iclog = log->l_iclog; do { if (atomic_read(&iclog->ic_refcnt)) { @@ -439,7 +456,6 @@ xlog_state_shutdown_callbacks( spin_lock(&log->l_icloglock); wake_up_all(&iclog->ic_write_wait); - wake_up_all(&iclog->ic_force_wait); } while ((iclog = iclog->ic_next) != log->l_iclog); wake_up_all(&log->l_flush_wait); diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index edc368938f30..a4244a8c43e1 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c @@ -1721,7 +1721,7 @@ xlog_cil_push_now( ASSERT(push_seq && push_seq <= cil->xc_current_sequence); /* start on any pending background push to minimise wait time on it */ - if (!async) + if (!async && !xlog_is_shutdown(log)) flush_workqueue(cil->xc_push_wq); spin_lock(&cil->xc_push_lock); -- 2.50.1 Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284 Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705