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 0F00A2D2488 for ; Mon, 25 May 2026 15:30:37 +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=1779723039; cv=none; b=BYEciQawVb5N9BAMk33KoKXjgc+HIoiHwg3pa8ykl+mOhFWY6dKjYSGNnbsMbDkL20q1nrJJ7ewDgaFcxPBrlX2OfePBapNeH+WTkOgtgZ4Nt/EJGi5cfr9Pk54rlFDb15AJFVHhGh+n9EudhSZkVG4v42FXCfQViGu2hMWJe58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779723039; c=relaxed/simple; bh=LJdBiSfFDvDt2LHl9BFlzSGWUtbjDv+f9joc+kVT/uM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=kfCSR88jqBWjqzzy85uKKIlFKt/mV3ZUJjmvqEgSNKcRB3b2PqlEHVjgdXWrvnC0EDPzEBf3shrYAPxqPp8NMPPIhvUjOV9DgKK/lhibtu08dMbiqq4KHi2ijBlaaHjQCw6R+UgB6Z3o/FVQ+iWywDgQMYbix+i1wrInV6nlyFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S415AHNc; 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="S415AHNc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B50B1F000E9; Mon, 25 May 2026 15:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779723037; bh=OtJlsoM2fF6Cnpl17HukfO1fqAnQBAvmo87VBXGoBmo=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=S415AHNc03IacdvQbnISEPk2z1abb4XVpEac+IYMKNL9F1T65+bfcN7/vL7fDcTGs k1Xo6TYD8kyRb+MZZ3ENaTNByGpWEMCVtiTRgVFpKqGzqgqNQ9xtVnHXPClP9EXaPb PECYEHpyJ0oY5f5i58xKCWrexuNtdvWil+ULjWJky+EIZAFDD9KzhG6ukX2rHZdAUo 5gR4E1/5hHfaq6mcMKV5dynarDuH78p69AqniiNyE+bVzTOR/s0fGUp5yKAX4ED7Eg dZ511PZk/USgwGcq3z4JmYrxjbQgP0Mg+QR2tQ3utqOU8kUjgz5FZuHPp5FCHexA66 w9vJIQ8e/3Plg== From: Pratyush Yadav To: Yifei Chu Cc: Pasha Tatashin , Mike Rapoport , linux-kernel@vger.kernel.org, Pratyush Yadav , Andrew Morton , Alexander Graf , linux-mm@kvack.org, kexec@lists.infradead.org Subject: Re: [BUG] liveupdate/memfd: duplicate memfd preserve restores same KHO folio twice In-Reply-To: (Yifei Chu's message of "Sun, 24 May 2026 10:44:40 -0400") References: Date: Mon, 25 May 2026 17:30:34 +0200 Message-ID: <2vxzfr3f7bhh.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 Sun, May 24 2026, Yifei Chu wrote: > Hello, > > Short version: I found that the same memfd can be preserved more than once in a single liveupdate session under different > tokens. After kexec, those tokens can both refer to the same preserved KHO folio, and the second restore path hits > kho_restore_page(). With panic_on_warn=1, this is a reproducible panic. Pasha fixed this with 00d0b372374f ("liveupdate: prevent double management of files"). It landed in v7.1-rc1. Since you seem to be using 7.0.9, please port this patch to the 7.0.y series and try again. If this fixes the problem, please send it to stable@vger.kernel.org so it can be included in the 7.0.y series. -- Regards, Pratyush Yadav