From nobody Sun Feb 8 16:32:11 2026 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 9594230C36E for ; Mon, 26 Jan 2026 23:03:16 +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=1769468596; cv=none; b=hSVEN8EF6/GWhU3jcfwLztuPK9ocVZiDVNkmdJNksKgNi0BHJK0PUDRSgLQDnlsFuvg0zsOIs0a5TTfC+6KN/YTY0Z1dQbLDM/Owbez/Unv0VmoJgqrY6uSSvC7ebgtDmFWXZ5lD2h856VIoOQKW4ZJ1lDy7GqMxHwfARVLqDx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769468596; c=relaxed/simple; bh=aWlSs1QnR62xNLtigN3Liyq3kVc1pzDFOlsqird+/cc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L4uFgxuKp/cdTX6hrIEHb21A6C+VJlCve6ZzhUe2aX6PJqsR44W1gEIXFOfu64JZ1CzDTxN2U5ECcLoK1BFYWIuO7xApdLIn8wZERrCB2OympBxoHg8i8ucRsObT3hq1Nv7knmq0m/jvutMYmuhMwxj+3CFAWEDyPveti8odecA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FCV6O+SF; 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="FCV6O+SF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EE2EC19422; Mon, 26 Jan 2026 23:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769468596; bh=aWlSs1QnR62xNLtigN3Liyq3kVc1pzDFOlsqird+/cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FCV6O+SFK07souvAqzjLyiDnTe9poLJbhqeZIzzTR2zs+qoyCfx59s0uXMaN9S/vp yMFLFF8jg3p+4dai6tPBARnBYbF0CbgZmjMACRaniJ2zA8oLu1BcJU3zKDWZOLx62/ haJSAWs2bRGWLf8NnF2gl/DJUKJS25ygfYG+F2m7ka+FZgaXIGphoBWyrkHno9x49e XCh3Tfx8LMwU2wBbXoYr1BIIe4JN4x+4bJf58PG26DsXzuwdw7URh1Ne5gNaFCKDPn UexVxNBzUjH4wH72//khKCUkk8R0SCw/RlL53WEUtuVSIYmp6/m38QFjUy3RnqM/+x J6c812wty8Dxg== From: Pratyush Yadav To: Pasha Tatashin , Mike Rapoport , Pratyush Yadav , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/2] liveupdate: luo_file: do not clear serialized_data on unfreeze Date: Tue, 27 Jan 2026 00:02:52 +0100 Message-ID: <20260126230302.2936817-2-pratyush@kernel.org> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog In-Reply-To: <20260126230302.2936817-1-pratyush@kernel.org> References: <20260126230302.2936817-1-pratyush@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Pratyush Yadav (Google)" The unfreeze operation is supposed to undo the effects of the freeze operation. serialized_data is not set by freeze, but by preserve. Consequently, the unpreserve operation needs to access serialized_data to undo the effects of the preserve operation. This includes freeing the serialized data structures for example. If a freeze callback fails, unfreeze is called for all frozen files. This would clear serialized_data for them. Since live update has failed, it can be expected that userspace aborts, releasing all sessions. When the sessions are released, unpreserve will be called for all files. The unfrozen files will see 0 in their serialized_data. This is not expected by file handlers, and they might either fail, leaking data and state, or might even crash or cause invalid memory access. Do not clear serialized_data on unfreeze so it gets passed on to unpreserve. There is no need to clear it on unpreserve since luo_file will be freed immediately after. Fixes: 7c722a7f44e0 ("liveupdate: luo_file: implement file systems callback= s") Signed-off-by: Pratyush Yadav (Google) Reviewed-by: Mike Rapoport (Microsoft) --- kernel/liveupdate/luo_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c index a32a777f6df8..9f7283379ebc 100644 --- a/kernel/liveupdate/luo_file.c +++ b/kernel/liveupdate/luo_file.c @@ -402,8 +402,6 @@ static void luo_file_unfreeze_one(struct luo_file_set *= file_set, =20 luo_file->fh->ops->unfreeze(&args); } - - luo_file->serialized_data =3D 0; } =20 static void __luo_file_unfreeze(struct luo_file_set *file_set, --=20 2.52.0.457.g6b5491de43-goog