Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.185]) (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 CA3A83128B9 for ; Mon, 1 Dec 2025 13:17:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.121.94.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764595027; cv=none; b=VaIdxdrtL73sfOhcb1VH7IXrqomr+GxedhSo9ImSJN0azGCzhl9zxLBKoRlykQMwGXTDG7CF1t2j2JWT8SZ1W+Fivj94Qx5G4ffWKqngfzH/Aw6jU3rJuUN3j+TFy19svDQswH9dDfa4Je4DFplPFzcTSCmaB7jq2sQqBYGPKN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764595027; c=relaxed/simple; bh=MDB8bW0CjGp6H7MyHYZ0F5P+qDg+LQDubU7VfwVq+Gg=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=N2i3GfpUhEV68lRv0K0mwaZYeXDuPZrTVzZ3eaTtm/EFpMsrZg2FL85vLwpbJD+/OF3J7SSA4uYe/z9OyhodtOitjo74stM65bAYjY5JrRc2CH3/fcPge09Z3RJd15TGB3h8H5xhJ2JCemVvTYGi7OkWwHOcaHXZbV7i9V0I2VU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xs4all.nl; spf=pass smtp.mailfrom=xs4all.nl; dkim=pass (2048-bit key) header.d=xs4all.nl header.i=@xs4all.nl header.b=T7OOn5Bw; arc=none smtp.client-ip=195.121.94.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=xs4all.nl header.i=@xs4all.nl header.b="T7OOn5Bw" X-KPN-MessageId: 40dd8a6c-ceb8-11f0-ad1a-005056999439 Received: from mta.kpnmail.nl (unknown [10.31.161.190]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 40dd8a6c-ceb8-11f0-ad1a-005056999439; Mon, 01 Dec 2025 14:18:40 +0100 (CET) Received: from mtaoutbound.kpnmail.nl (unknown [10.128.135.189]) by mta.kpnmail.nl (Halon) with ESMTP id 068e2198-ceb8-11f0-99c0-0050569977a2; Mon, 01 Dec 2025 14:17:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=content-type:mime-version:subject:message-id:to:from:date; bh=9ogpGpze997OiKUWLBB1tTc91EG3DgUJBfa5dKno3c4=; b=T7OOn5BwSXh2dB8SVVYN3zfo2GzPo5TJnaxrYYoDHUgQTbpHSgsmzXhQ2HKjpgCm7kNRWoe6wOPAl XBRsX29NrcnNKD29TE3O9YJcczRkfCvCYWnQDBtXD094+AoiANQAsNpCeEt5xBNym60sBEL3m6Ujin Cm088IbJDQgLgwebsEeLlDQeILkr4rw9HUh6q0Kc9c8b2UKRQqvnCCkPxEu2HzYPcR6c9PY6NhktqV sMjZFExVS9h7TPXcRVvSCZVUYIdr1XnV1oja+UPYctLMlVn3ixuUAEYW/L94G7P2iqIEELe0sqeEZE dcJYmaNy7iC0Aa7zGK7oz2l05KVIWbw== X-KPN-MID: 33|eQLS9dXDoBhz0AW0sauyOnKv/CSwqAUXSc5/o5x//es2pX4ylx6SaW4lkvokntj mTxwQ6CUlSX6EYT06xVA/A9jlAInApAc8wDf6xnqn1RM= X-CMASSUN: 33|XBeKen1quebrvWGEjhb7FamjJhBcD+9wnDqIz4fd7kJg3Ka2ZAgYqSOawtYtjPp Q3rGb++as8Ir1k+hKXjCqZg== X-KPN-VerifiedSender: Yes Received: from cpxoxapps-mh04 (cpxoxapps-mh04.personalcloud.so.kpn.org [10.128.135.210]) by mtaoutbound.kpnmail.nl (Halon) with ESMTPSA id 06868ad6-ceb8-11f0-94b1-00505699eff2; Mon, 01 Dec 2025 14:17:02 +0100 (CET) Date: Mon, 1 Dec 2025 14:17:02 +0100 (CET) From: Jori Koolstra To: brauner@kernel.org, gabriel@krisman.be, jlayton@kernel.org, neil@brown.name, shaggy@kernel.org, viro@zeniv.linux.org.uk Cc: jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, syzbot+9131ddfd7870623b719f@syzkaller.appspotmail.com, skhan@linuxfoundation.org Message-ID: <1228067824.65484.1764595022724@kpc.webmail.kpnmail.nl> In-Reply-To: <20251118163926.65737-1-jkoolstra@xs4all.nl> References: <20251028122212.290745-1-jkoolstra@xs4all.nl> <20251118163926.65737-1-jkoolstra@xs4all.nl> Subject: [PATCH] jfs: nlink overflow in jfs_rename 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=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal Below syzbot bug has not been fixed yet. If anyone has time I would greatly appreciate a review of my patch, so it can be moved along. It has been sitting for quite a few weeks. Thanks, Jori. > Op 28-10-2025 13:22 CET schreef Jori Koolstra : > > > If nlink is maximal for a directory (-1) and inside that directory you > perform a rename for some child directory (not moving from the parent), > then the nlink of the first directory is first incremented and later > decremented. Normally this is fine, but when nlink = -1 this causes a > wrap around to 0, and then drop_nlink issues a warning. > > After applying the patch syzbot no longer issues any warnings. I also > ran some basic fs tests to look for any regressions. > > Signed-off-by: Jori Koolstra > Reported-by: syzbot+9131ddfd7870623b719f@syzkaller.appspotmail.com > Closes: https://syzbot.org/bug?extid=9131ddfd7870623b719f