From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 64A8644CF44 for ; Tue, 16 Jun 2026 16:06:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781625991; cv=none; b=stV0mfdJhovaD923DvM1pj7pTtzZEUeSmoy9Ry8gqiaW3Tvia04TtByO7YMHSaIcZKWiA3PjYXvpUyNEMX4dd6dBL0VYRNJmLKUDofbqoximw4TXEeJMGIdrcnBCDcLibgs6ZXNNWRvErU0m6Mz6EmuoljvqTem2nx+ICsTbk0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781625991; c=relaxed/simple; bh=9jgiiKV2B0BOu9bVN0EVCRQbLFmcgHdK1LaSC+IExzk=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=ec8h4mbZi2MMFvuX9hutefxv6rr/ITSGor+sytIg0SyuOboqGWhX6AyN6ZtgMmRQtXTjc3bPEOX/Or40qACSxTegRnqXBo0FHQnwVK/BhIc4Mw4lOad5dbDSSTKrnovkXmnz6wY2gG1jEFP52fOkZZxUS7XGYFAIS3EdAG7GWPg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Fljpcru9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Fljpcru9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781625989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wj+6SL5M0Mbu7to4+1VU7Ec31p02uVSmZmpXCIxmyOw=; b=Fljpcru92AyO1WZiwz8GQtHxpQ9wLg2x8CjZFtzlHz6qjhNe/LSABh+tIW0wgMjq6AiBdZ vr2Ae3SUncgbNC3T97CTV3v/JL2N/ZqxQ8BsoiP9ZImRSUdcWdXQvOUWtLLBg+PWf12uMO 0dmhF+IMsKcM/iVN0TUpsuQnRLnOLcI= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-rRV8mpioMySDoliW0563pQ-1; Tue, 16 Jun 2026 12:06:25 -0400 X-MC-Unique: rRV8mpioMySDoliW0563pQ-1 X-Mimecast-MFC-AGG-ID: rRV8mpioMySDoliW0563pQ_1781625984 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A0C718002FB; Tue, 16 Jun 2026 16:06:23 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.44.50.44]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E05C180058F; Tue, 16 Jun 2026 16:06:20 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <68185b7b.a70a0220.254cdc.0046.GAE@google.com> References: <68185b7b.a70a0220.254cdc.0046.GAE@google.com> To: syzbot Cc: dhowells@redhat.com, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, marc.dionne@auristor.com, Hillf Danton , syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [afs?] INFO: task hung in afs_cell_purge (2) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2139464.1781625979.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Tue, 16 Jun 2026 17:06:19 +0100 Message-ID: <2139465.1781625979@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t v7.1 afs: Fix hang in afs_cell_purge() = Fix a hang in afs_cell_purge() due to net->cells_outstanding being upd= ated before the check for idr_alloc_cyclic() failing. = Reported-by: syzbot+750f21d691e244b473b1@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: David Howells cc: Marc Dionne 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_ne= t *net, cell->dns_source =3D vllist->source; cell->dns_status =3D vllist->status; smp_store_release(&cell->dns_lookup_count, 1); /* vs source/status */ - atomic_inc(&net->cells_outstanding); ret =3D 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 =3D ret; cell->debug_id =3D atomic_inc_return(&cell_debug_id); =