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 75684267B65; Tue, 8 Apr 2025 11:05:32 +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=1744110333; cv=none; b=aO8kY5UMUqHqz9AGSUny3nz+R2IfgMOqXJ000ijcKS8mia6nvDtXmthBY+hSW87Mm6Lp8tTv8fmTZnjxWKVFSZu5oSQQqR7RWNvZ6PsqNcmh5kMRnsdI96LWKdiUFxJY9IA97x9HOrtBqBjxzK9I1Ti7GafWWK4nkApVWsrAv64= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744110333; c=relaxed/simple; bh=yT5bkNZUEfpcXqy/nMRL1E4+qqMHIJGndQafI7yG7Ek=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SinvwH0XrBkjrk3iepTlqtb63lsrhsT+kkCxh0NyRbWN5VxMmyIykc5PBbzvGByYS+sQHADhiEifh2kIVJ9HSkALo4+G6gNtxGbVAOc6o+5Q/M8Aif1DskgYUSt7IlVTKP3tdzOY2tqEwllDP7bdDi3bTGMrPHBkyJQPnfoLQ9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rAqfV/ot; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rAqfV/ot" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 349EEC4CEE7; Tue, 8 Apr 2025 11:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744110332; bh=yT5bkNZUEfpcXqy/nMRL1E4+qqMHIJGndQafI7yG7Ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rAqfV/otrlfKdYfj8UzM25sBUNv1N8uylfp5z2fsbSgHNmMjdqe7uDaqT2BotZ/Jv zUAAwm8G79SsDmaR+aKNlwqhHGwPXhhdiGaSCljObCagRwkGHeBoZhnnd8NQDrEcCx rgvgQpDGax/dMP2ssJSvIic+Xcozjj4KIKy/a9dM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Peter Zijlstra (Intel)" , Ingo Molnar , Linus Torvalds , Andrew Morton , Sasha Levin Subject: [PATCH 6.14 025/731] lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock Date: Tue, 8 Apr 2025 12:38:42 +0200 Message-ID: <20250408104914.852048827@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104914.247897328@linuxfoundation.org> References: <20250408104914.247897328@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Zijlstra [ Upstream commit a1b65f3f7c6f7f0a08a7dba8be458c6415236487 ] Turns out that this commit, about 10 years ago: 9ec23531fd48 ("sched/preempt, mm/fault: Trigger might_sleep() in might_fault() with disabled pagefaults") ... accidentally (and unnessecarily) put the lockdep part of __might_fault() under CONFIG_DEBUG_ATOMIC_SLEEP=y. This is potentially notable because large distributions such as Ubuntu are running with !CONFIG_DEBUG_ATOMIC_SLEEP. Restore the debug check. [ mingo: Update changelog. ] Fixes: 9ec23531fd48 ("sched/preempt, mm/fault: Trigger might_sleep() in might_fault() with disabled pagefaults") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20241104135517.536628371@infradead.org Signed-off-by: Sasha Levin --- mm/memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index fb7b8dc751679..4f6d9766a0460 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -6834,10 +6834,8 @@ void __might_fault(const char *file, int line) if (pagefault_disabled()) return; __might_sleep(file, line); -#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) if (current->mm) might_lock_read(¤t->mm->mmap_lock); -#endif } EXPORT_SYMBOL(__might_fault); #endif -- 2.39.5