The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: syzbot <syzbot+750f21d691e244b473b1@syzkaller.appspotmail.com>
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org,
	linux-kernel@vger.kernel.org, marc.dionne@auristor.com,
	Hillf Danton <hdanton@sina.com>,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [afs?] INFO: task hung in afs_cell_purge (2)
Date: Tue, 16 Jun 2026 17:06:19 +0100	[thread overview]
Message-ID: <2139465.1781625979@warthog.procyon.org.uk> (raw)
In-Reply-To: <68185b7b.a70a0220.254cdc.0046.GAE@google.com>

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v7.1

    afs: Fix hang in afs_cell_purge()
    
    Fix a hang in afs_cell_purge() due to net->cells_outstanding being updated
    before the check for idr_alloc_cyclic() failing.
    
    Reported-by: syzbot+750f21d691e244b473b1@syzkaller.appspotmail.com
    Suggested-by: Hillf Danton <hdanton@sina.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: linux-afs@lists.infradead.org

diff --git a/fs/afs/cell.c b/fs/afs/cell.c
index 9738684dbdd2..e0fab1609f27 100644
--- a/fs/afs/cell.c
+++ b/fs/afs/cell.c
@@ -205,11 +205,11 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,
 	cell->dns_source = vllist->source;
 	cell->dns_status = vllist->status;
 	smp_store_release(&cell->dns_lookup_count, 1); /* vs source/status */
-	atomic_inc(&net->cells_outstanding);
 	ret = idr_alloc_cyclic(&net->cells_dyn_ino, cell,
 			       2, INT_MAX / 2, GFP_KERNEL);
 	if (ret < 0)
 		goto error;
+	atomic_inc(&net->cells_outstanding);
 	cell->dynroot_ino = ret;
 	cell->debug_id = atomic_inc_return(&cell_debug_id);
 

  parent reply	other threads:[~2026-06-16 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05  6:32 [syzbot] [afs?] INFO: task hung in afs_cell_purge (2) syzbot
2025-06-07 22:45 ` syzbot
2025-07-21 14:02 ` David Howells
2025-07-21 15:41   ` Aleksandr Nogikh
2026-02-16 14:48 ` syzbot
2026-06-16 16:06 ` David Howells [this message]
2026-06-16 20:08   ` syzbot
2026-08-04 13:08 ` syzbot
     [not found] <20250608054619.924-1-hdanton@sina.com>
2025-06-08  6:13 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2139465.1781625979@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=hdanton@sina.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=syzbot+750f21d691e244b473b1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox