From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 3030741E6D9 for ; Wed, 12 Aug 2026 10:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531847; cv=none; b=PWMM3iGJSxZb5tiBOzGZcBqAn/o/NE0B0sC+p5kyhyxXys2YCxZb+RUN2WjlK4MsGxfK63o65Twfo42vK9h7bF4js4swp6CXVQq1NQs2snqA7iYD2xhLGzvkqlXFn9OwvR8PWfOzy9zAd+1GoUxqIdey34G7HhOwyn9or9gLmVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531847; c=relaxed/simple; bh=EF+txQzyrnzL5CZn0rjOcyeLl+u/VVSJUJCjgcDjzI4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E0CU5KOGhTi5wylc17J+sy5VSGVYwUFJ7VNA7H0xJfnNQOU7Hi1qDfmHb/cMHU4wZ3RnL3E/eIap5knnbDXlhbtzLKA2Y6EuKKaMHXFwom3Z7il1Mm6NnAAV65Zqtb4ykMbdwJU2JdoBwaTWeSQr+gzOu0vrP8C8QVue0YmmYP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=Kc9CsGgZ; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="Kc9CsGgZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9tOd6PpRPU/jaWpkEZh0iLAEcStPnZBl4J+E222fKyk=; b=Kc9CsGgZuur17iN2D221RDMhj2 DcexZeEvhqKDDpgjdujdSRXnMZLhifzhaXSCbWHPYOXR5gr2xPoR0Ba95YP+I4OAeAYfEOGA3io/e lNI9WWre2RHJC7vsBTKfOHEPZEHrX+CSlvG5J9uf8CoutJSTvvWJADYAYga5Qzbu9fRRaIwzIjBbT D7tRC3pjpBMaq1NpTybBB4vXcOT7v8iOnfTmTLBeuR34EOyGgB+s0NC04cli07ynOByX4Q1Nk8CY8 D08zHJXD3i4imeKqH072dHxuOsfeBm2Qv7IefHeign633Fm0ElYMpRPN3311ONIEU/+Gg9zMge3il tTNP6QTQ==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wu6XP-004I1e-0a; Wed, 12 Aug 2026 10:50:23 +0000 Date: Wed, 12 Aug 2026 03:50:16 -0700 From: Breno Leitao To: "David Hildenbrand (Arm)" Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , Hugh Dickins , Baolin Wang , Peter Xu , Johannes Weiner , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH 3/3] mm: fail the fault on a malformed swap entry instead of retrying it Message-ID: References: <20260810-swap-v1-0-375ef0767206@debian.org> <20260810-swap-v1-3-375ef0767206@debian.org> <8c16339b-6050-4a5e-aa89-9f2f96e7dcb4@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c16339b-6050-4a5e-aa89-9f2f96e7dcb4@kernel.org> X-Debian-User: leitao On Tue, Aug 11, 2026 at 05:38:50PM +0200, David Hildenbrand (Arm) wrote: > On 8/10/26 18:26, Breno Leitao wrote: > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -4957,6 +4957,9 @@ vm_fault_t do_swap_page(struct vm_fault *vmf) > > /* Prevent swapoff from happening to us. */ > > si = get_swap_device(entry); > > if (IS_ERR_OR_NULL(si)) { > > + /* A malformed entry never becomes valid, so don't retry it. */ > > + if (IS_ERR(si)) > > + ret = VM_FAULT_SIGBUS; > > si = NULL; > > goto out; > > Better update the comment above get_swap_device() to include "bad swap entries" > as well. Best do that as part of patch #2. Ack, I will update and respin. > I didn't look too closely, but conceptually LGTM Thanks for the review so far! --breno