Message ID | 20240509100148.22384-3-osalvador@suse.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4FADC10F1A for <linux-mm@archiver.kernel.org>; Thu, 9 May 2024 10:02:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF3426B0093; Thu, 9 May 2024 06:02:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E7AC36B0095; Thu, 9 May 2024 06:02:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D44876B0096; Thu, 9 May 2024 06:02:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AFE126B0093 for <linux-mm@kvack.org>; Thu, 9 May 2024 06:02:14 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 626968155E for <linux-mm@kvack.org>; Thu, 9 May 2024 10:02:14 +0000 (UTC) X-FDA: 82098416988.19.61919EF Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf13.hostedemail.com (Postfix) with ESMTP id 400CD2001B for <linux-mm@kvack.org>; Thu, 9 May 2024 10:02:12 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="yrG/oC93"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kBBKn7Nm; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="yrG/oC93"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kBBKn7Nm; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715248932; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fH9mcFMskWdh4UuFUQbCoC6swB7vTaoxR3AzCi/uWRg=; b=qPoApYG8Tvbu0F9DSmPA5VSD019xp6p7n8JIJ1/44fuq47PfoXVav1nMYTsJctMCsGpLIL QyJ4cvp3KqrX3R3YmMKjGKNO4RWgMwD3Na99Eb5yhO0Nt1hGGxuZ61mXoWqjjUdllX9Na1 EkoTW+hnNjctMkq1AtzE3R3x41qy1kE= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="yrG/oC93"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kBBKn7Nm; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="yrG/oC93"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kBBKn7Nm; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715248932; a=rsa-sha256; cv=none; b=TVN4ziJi024WO9RqowcjBJ8bzHNL4XP/VLRwJ/T0Ycif5BLdKn6WGoygIcLAy6IAZgK4mD kS5yqHRr+rx0VyHsr1UrOp2BW+S3HYIrFIaKUcmVfkiZDz45JT1kvZGIdTKnBlS8mF8idK eCWBndPFZFnnUZ7xAoZOKqqps5q5kNo= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DC2345FC50; Thu, 9 May 2024 10:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715248930; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fH9mcFMskWdh4UuFUQbCoC6swB7vTaoxR3AzCi/uWRg=; b=yrG/oC93h5JV8qQmse+DMDxdJ3XjcpoZ8p9RWPbh8qeIgBEK4uSnqJXtVl+5s5vB3Ir2oP gbL318bcbu5brHByri1fMi3aKj6H6X4TUb1QAgT0iEco9HOk/w8ffwlxdL832dk5VmZDXw BZlAyoxMZz7UEC75NwUYOkgb4qorXMU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715248930; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fH9mcFMskWdh4UuFUQbCoC6swB7vTaoxR3AzCi/uWRg=; b=kBBKn7Nmv3J/YzvrHjy1h4S3Y+YMOCrtdI5mhdpzd8xfufJcrmzRkM0Qyvz9ZaUPv/7p9f 8EiDPJlRTErRyMCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715248930; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fH9mcFMskWdh4UuFUQbCoC6swB7vTaoxR3AzCi/uWRg=; b=yrG/oC93h5JV8qQmse+DMDxdJ3XjcpoZ8p9RWPbh8qeIgBEK4uSnqJXtVl+5s5vB3Ir2oP gbL318bcbu5brHByri1fMi3aKj6H6X4TUb1QAgT0iEco9HOk/w8ffwlxdL832dk5VmZDXw BZlAyoxMZz7UEC75NwUYOkgb4qorXMU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715248930; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fH9mcFMskWdh4UuFUQbCoC6swB7vTaoxR3AzCi/uWRg=; b=kBBKn7Nmv3J/YzvrHjy1h4S3Y+YMOCrtdI5mhdpzd8xfufJcrmzRkM0Qyvz9ZaUPv/7p9f 8EiDPJlRTErRyMCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3C31B13941; Thu, 9 May 2024 10:02:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WHeLCSKfPGZbOAAAD6G6ig (envelope-from <osalvador@suse.de>); Thu, 09 May 2024 10:02:10 +0000 From: Oscar Salvador <osalvador@suse.de> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Muchun Song <muchun.song@linux.dev>, Peter Xu <peterx@redhat.com>, Axel Rasmussen <axelrasmussen@google.com>, Liu Shixin <liushixin2@huawei.com>, Oscar Salvador <osalvador@suse.de> Subject: [PATCH 2/2] mm/hugetlb: Add missing VM_FAULT_SET_HINDEX in hugetlb_wp Date: Thu, 9 May 2024 12:01:48 +0200 Message-ID: <20240509100148.22384-3-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240509100148.22384-1-osalvador@suse.de> References: <20240509100148.22384-1-osalvador@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 400CD2001B X-Stat-Signature: oy1u1tc9gjshuqfc5c4h11ny7d8bzj5i X-HE-Tag: 1715248932-471099 X-HE-Meta: U2FsdGVkX1/R9S7sLkEy1trHV5YF7ReoXRW+PT4WY0F+eFd4LICTc52QJkm/qRIjb/bGD3KUJhkB0aeSW+ROFqwJdglcHlJCMXTOF9tQlW+U/5iwYhbKj598UTEY2drB/aW0DRu0eUVPisNnVKbIxrKHp4fSbmYdR+UXE64RBU10zz0Ad0jg5umA498g1K9PAUGzPDTgH9KO8+/sf1ofIF8c3x5Xtg/ZfvvHjwoDoqblLt3oMR+qCwboq5XFirB/v/vO1dudgRUtiCbFvpFnrhimKZDcK12Uggj2P9mHWx+j0LZSzt2nPvyTQbSqOzWhQhxXFItOtwJ0YEUatqP81DxA0QOgFAbApiBnpjoUzDsuZE1YWz+5pgbR6bha/YXlVc2V5Qj1pdcDl6d2A4URQbU5sG+r6j0Ymta3rHacNg+SnwK1S/xtnDyw+L7hkXkhdUb+0i6sN8mfMbLMCDAziqmlGcl8DWwJa0TDlpVZ6WOQpe44xlfsNPbgsf21v6DVKgC5mHrR94ZyAdKFB8EWMQ2xugocjfx2ssr9G7Llxe1Kd0zlSw7/+G2antq3aFgdxPZuTRHNsTlpzgvTLq2EW5RSN8aa5PGYCKPgNMfa2XFWIGydh2wJWn8aAAzMaalPifkV1KZZIqntEmUuMeLV8ou4EgCmnZoGpIBwCV5q/e3pjDFIM08DT6LongFiBI6Zi5OeHrq6TJeXaxQgCGXVx51xNh1T0oPhY+Ye3kX5hr/g8HFsqrBtgC/oivpNu1O/zga5Gtt/VCGeJ2N+hijTxCeraVMFxyLSqRjexA1+53hrTExXD+EiUEFpqGONwf2DUX0Q8U7RWgTL76aenbqkeyXz5ALOppeY79RhZs8quVvj+eEvG2T8KsLMNvTy3UhfFMInFixHU3eXWoHs3uWi6+amgHzavqEn+T4wnjmGF0blpUH+VBvhPd+3zM6SBO1L5VuUiBg6j3vFG/qsC4A dyNKxb71 QvPLRI0NyZaHTUhFqBEnHAloKONoecqOJPlzldtX3OpszrSmb6KT/4v5kAFpvT/Lvk3amDLIUGC5Q/8P4kCI8untUO8O6KG8xyszGtAXOnHVKyKSIK6flVRgAs95jNJ/klfMluX6gVy4KftHa5b/l505eUdpL5SKlraIvWzfvyhRNIlb25TK+jfGxgUamks2RTOUy0am/xejcbJJP2O5sy5BNPd6pHRdwP0veqC9kCO3Gf/AM+Ak//yI5gTgriDWJx/0TyKQF8vxQJQMtE6s6+xle5w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Minor fixups for hugetlb fault path
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 262456daf327..6be78e7d4f6e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -6067,7 +6067,7 @@ static vm_fault_t hugetlb_wp(struct folio *pagecache_folio, goto out_release_all; if (copy_user_large_folio(new_folio, old_folio, vmf->real_address, vma)) { - ret = VM_FAULT_HWPOISON_LARGE; + ret = VM_FAULT_HWPOISON_LARGE | VM_FAULT_SET_HINDEX(hstate_index(h)); goto out_release_all; } __folio_mark_uptodate(new_folio);
commit 1cb9dc4b475c ("mm: hwpoison: support recovery from HugePage copy-on-write faults") added support to use the mc variants when coping hugetlb pages on CoW faults. Add the missing VM_FAULT_SET_HINDEX, so the right si_addr_lsb will be passed to userspace to report the extension of the faulty area. Signed-off-by: Oscar Salvador <osalvador@suse.de> --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)