From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 54EFB3EAC84 for ; Tue, 2 Jun 2026 17:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780420702; cv=none; b=mgHP2YBz5+7jxFpQIqLAfVqoYSBX1N6EbXii2UUib3fUK67x6kRVNU16UURqoYK3Y6POQP5R00ud9IMwx8MqYWRTGSb7+5Vfr1kGr+i5gyIvTXTXk4yjqZorJmHs6KRCfLsh9e4LW0bZTjq/NOLquxwXU7vdwpy5r2ogLxp6nB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780420702; c=relaxed/simple; bh=d9PrBPcw1dzU+vwnStPPv2NGQi2H2lcLA7uJC7CXEXQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sgMcUCf4aWG8snBFV3a4kMyF0Te7Qqmjcha0dc1xw3fTzTFUXxNb4rb3V6lvorKePG+8EAWtj3IzGffijJUmwwrokWyuOcSBAxnxWpviyfxdvNvj1GmiE5P5EjfPPg6wSnrg0mMgeDgjjUXXhhNQSzobHw4I+LUYIl3c7x2zuoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZBxrHBw6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZBxrHBw6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAE2C1F00893; Tue, 2 Jun 2026 17:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780420701; bh=D0Boguu0LesyWMHeJhzuparvQJGWjUOs54nvxOhsjj8=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ZBxrHBw6VSwU1zg4uqbpFnH3K0w7m+VvpVuAbGTdRTiPirUpWt1BSpygDe1jF3Jsw DvSsjdRlSHSDpZdFuvh/R/QyaC+wlVWWftrQEaqhmW18agJn0ay/I8YcGm5Rqw35dg V4+xQuLSIaXuA90whmsDlQq/PIv5Bwlt76TXLPyD2Xy3Q7kLiRamRafwkwMbehFxpm t6S+lZSE1exIY/EdwMVwwmljjLcnJ/KsxhLODXEf5gm6NiZ8N7VFKFDvdOUKHKU9Nm WyLnqK0gektVM6OMrhQf6W4ZqeheKqEB3zozTPfDMEc/0p3BVqxdyyqOXfm+HVJDaD pGToyiFVGhFfw== From: Pratyush Yadav To: David Matlack Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Morton , Mike Rapoport , Pasha Tatashin , Pratyush Yadav Subject: Re: [PATCH 2/2] liveupdate: Remember FLB retrieve() status In-Reply-To: <20260528174140.1921129-3-dmatlack@google.com> (David Matlack's message of "Thu, 28 May 2026 17:41:40 +0000") References: <20260528174140.1921129-1-dmatlack@google.com> <20260528174140.1921129-3-dmatlack@google.com> Date: Tue, 02 Jun 2026 19:18:18 +0200 Message-ID: <2vxzbjdsdfol.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, May 28 2026, David Matlack wrote: > LUO keeps track of successful retrieve attempts on an FLB. It does so > to avoid multiple retrievals of the same FLB. Multiple retrievals cause > problems because once the FLB is retrieved, the serialized data > structures are likely freed and the FLB is likely in a very different > state from what the code expects. > > All this works well when retrieve succeeds. When it fails, > luo_flb_retrieve_one() returns the error immediately, without ever > storing anywhere that a retrieve was attempted or what its error code > was. If the user attempts to retrieve another file registered with the > same FLB, LUO will attempt to call the FLB's retrieve() callback again. > > The retry is problematic for much of the same reasons listed above. The > FLB is likely in a very different state than what the retrieve logic > normally expects (e.g. some KHO pages may have already been restored and > freed). > > There is no sane way of attempting the retrieve again. Remember the > error retrieve returned and directly return it on a retry. > > This is done by changing the retrieved bool to a retrieve_status > integer. A value of 0 means retrieve was never attempted, a positive > value means it succeeded, and a negative value means it failed and the > error code is the value. > > This is similar to commit f85b1c6af5bc ("liveupdate: luo_file: remember > retrieve() status") which did the same for LUO files. > > Fixes: cab056f2aae7 ("liveupdate: luo_flb: introduce File-Lifecycle-Bound global state") > Assisted-by: Gemini:gemini-3-pro-preview > Signed-off-by: David Matlack Reviewed-by: Pratyush Yadav (Google) Thanks for fixing this! [...] -- Regards, Pratyush Yadav