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 EFF09481AB6 for ; Mon, 18 May 2026 16:24:18 +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=1779121459; cv=none; b=HcjlvBuFNt4n2IwbpKQdSCd7VTbIKlAP/pbKou6guM1IIJUakuXSx5uqP5NFnLZgL/lhawMOO6A2zfQfi1lt4lMN3ILd7vmcWBjcy8OjZW1mnpbDZSU4yadRB2naSD+8SXKELic3fCMFf6oKbNef71zO9RGgvYEEBV4e/+t/ABs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779121459; c=relaxed/simple; bh=AgKZohJ4UvHWGRQR2XDplp4d6aaMpzNqY4yQBb+FLIE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Dd16/hd9/KaXi9CCOfbi+MgWcfiXXNs3RH0RV9UPvnjNZLA2fzAH/KgWlVlexeaqjJ5AwRpCo4UiB9EAfzvMbEtFpsiRmLqMQ7GYVE4FyZt+onPG/w+99s61uPpHZprSzuOD2l8qUC1hfXXK69r8cXTyPsh7YzTxA6oitKaSgdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RguwjGZ+; 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="RguwjGZ+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 403B7C2BCB8; Mon, 18 May 2026 16:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779121458; bh=AgKZohJ4UvHWGRQR2XDplp4d6aaMpzNqY4yQBb+FLIE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RguwjGZ++BfuIc9X88m+ukYcdKN6GlROkw1uMP1KDwnUipPipt25rZXOu84rbt1Id nrr1h/jue3Cf1O9gf7oPp3MJFKTR5BUAzvj/YU9AtsrVCrYKbOO71PkHCqK6fi7Gx+ gmCOWToc6XyFMAqTx7qTc5/gw5l3MDNAjig53JPdZ6UZANHUPsoNHIeQmZtBHaguC5 g5T8eKcqX1Q9lczrLxPV9DVcnqEIq32N54s5IvdbHimulBkhL9oaEgJEZCWjWEyIsg KYkA48xDdDicJu/Ip6HrbU0dYsY7xSCCT+MR0vg0w80kVpKcdV/BzJsfxgOJYhUxsn S4WqTjZzlFjPQ== From: Pratyush Yadav To: Pasha Tatashin Cc: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: Re: [PATCH v5 4/5] liveupdate: fix u-a-f in luo_file_unpreserve_files() and luo_file_finish() In-Reply-To: <20260518125459.1092373-5-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Mon, 18 May 2026 12:54:58 +0000") References: <20260518125459.1092373-1-pasha.tatashin@soleen.com> <20260518125459.1092373-5-pasha.tatashin@soleen.com> Date: Mon, 18 May 2026 18:24:14 +0200 Message-ID: <2vxzwlx08z4h.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 Mon, May 18 2026, Pasha Tatashin wrote: > In luo_file_unpreserve_files() and luo_file_finish(), reorder > module_put() and xa_erase() to ensure the file handler module remains > pinned while its operations are being accessed. > > Specifically, luo_get_id() dereferences fh->ops->get_id, so the module > reference must be held until after xa_erase() (which calls luo_get_id) > completes. > > For luo_file_finish(), this requires moving the module_put() call out of > the luo_file_finish_one() helper and into the main loop of > luo_file_finish() itself. > > Fixes: 00d0b372374f ("liveupdate: prevent double management of files") > Acked-by: Mike Rapoport (Microsoft) > Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav (Google) -- Regards, Pratyush Yadav