From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 51A4D2EB0F for ; Fri, 3 Apr 2026 09:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775207069; cv=none; b=qqNWg9xfPdxGJmWJn8Z8j7aej8Gtaq1+wDRJ1jfxhnnjvWGlxWMh3LuzUz3mxAMtpiJQrNk0RkU8qheuI8SeosTk03dc++AoC1c6L+WYZGqepxp0mry1AYFDpfBKp2t/4Ls3062MIt3evmNFh0U7h10CXrVRy44TwXK12HT9yrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775207069; c=relaxed/simple; bh=0PGn1St9grUuFwNpyUWQTc0vKOyRPAfdft8Lvp/kstE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=PY98vumqIZ3HFBJcpyBVtd5/wH1ZIapY4HWsPPcBb0Vs4kGC0ZIFX16Zq2tk2Cg+fs7rk3J46BNw2RwvNxsBH1Q6ZY+8airDgdjT1jPVP1a8pKNOukZnj/yvjOkDZVXkLQbi0o4ZLnQ1yL1MHQY+ggv6t3O2ndZMIlit2Oj23iY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZRXanmJk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZRXanmJk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CD3DC4CEF7; Fri, 3 Apr 2026 09:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775207068; bh=0PGn1St9grUuFwNpyUWQTc0vKOyRPAfdft8Lvp/kstE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZRXanmJkNXfm+wk3YZxQlxVXfMXCJlLkKQI1dE9au4DuHWKdF/MYDTYXN1nc2xgVj +enCd8wFKPIET7hwJeK15xqITD6UWgtQr3lUiqhU7fzkNIIsBztci4KqWmoUMIezZX UE3McLMTEYxYHlTJiJSw0GZf41158VF+KgwhsPtuSHjm/KrrOUQtskK3WCN7vvhu2A bnXI/1qhbYIAdMgEfdCciGAacbFSblYWpBZIfLgCsnSr0ODW1157TFPuVvpComvjaR zfCfeCg5vlMHGaLUpdr2PRS27Txy2KVbrLBjx3wRPATzME15oIWGrHuu03rvTrVrCL P9EMmr++c+/aA== From: Pratyush Yadav To: Andrew Morton Cc: Pratyush Yadav , Leo Timmins , pasha.tatashin@soleen.com, rppt@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] liveupdate: initialize incoming FLB state before finish In-Reply-To: <20260402111550.82c0f204ccaae2f81d584d71@linux-foundation.org> (Andrew Morton's message of "Thu, 2 Apr 2026 11:15:50 -0700") References: <20260326042546.8031-1-leotimmins1974@gmail.com> <20260326042546.8031-3-leotimmins1974@gmail.com> <2vxzmrzlfq4e.fsf@kernel.org> <20260402111550.82c0f204ccaae2f81d584d71@linux-foundation.org> Date: Fri, 03 Apr 2026 09:04:25 +0000 Message-ID: <2vxzv7e8e7om.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, Apr 02 2026, Andrew Morton wrote: > On Thu, 02 Apr 2026 13:28:33 +0000 Pratyush Yadav wrote: > >> The state of an incoming FLB object is initialized when it is first >> used. The initialization is done via luo_flb_retrieve_one(), which looks >> at all the incoming FLBs, matches the FLB to its serialized entry, and >> initializes the incoming data and count. >> >> luo_flb_file_finish_one() is called when finish is called for a file >> registered with this FLB. If no file handler has used the FLB by this >> point, the count stays un-initialized at 0. luo_flb_file_finish_one() >> then decrements this un-initialized count, leading to an underflow. This >> results in the FLB finish never being called since the count has >> underflowed to a very large value. >> >> Fix this by making sure the FLB is retrieved before using its count. > > I like that the above tells people what the actual bug is! > > I still have both Leo's patches in mm.git, in wait-and-see mode. What > to do here? Should I upstream [1/2] and drop [2/2]? Drop both and > revisit after -rc1? These are independent fixes, so I would suggest keeping 1/2 regardless of what we do with 2/2. For 2/2, I would suggest replacing it with the version I sent in <2vxzmrzlfq4e.fsf@kernel.org>. Mike/Pasha/Leo, if you could review my version then that would be great. Also Leo, please help with testing. I don't have a setup ready for testing this corner case. I can set something up mid next week, but it would be great if you can test this before that. > > Also, did we consider cc:stable for these two? Perhaps add the > cc:stable if we decide to attend to this after -rc1? FLB landed in v7.0-rc1 so no need for cc:stable for patch 2/2. For patch 1/2, I think cc:stable does make sense, but it only landed in v6.19 so not super important given it is not LTS. -- Regards, Pratyush Yadav