id 17D6AC19424; Mon, 5 Jan 2026 11:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611111; bh=HepWdr61P2Nnu0TfA8hlDSWF8r43PB+woQ5DTEhEZCM=; h=Subject:To:Cc:From:Date:From; b=oes+ICBFyAEJL91fI0WoqNYcRYsgAfDx7Hk8q6j5ieKc5SX3USHXAhd1iBj+08t8F mE0/oYCqV8pQrDbRtKJrv3ZxPZ678ACuPRj2TZjcXCphP2GTWBNPvtQOJLSu1wGz1f DWFwTuv+sQfgSr/v1B2Bx/7ka8xDfzPGzeUv++MY= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle alloc failures on" failed to apply to 6.1-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:05:00 +0100 Message-ID: <2026010500-endurance-wobble-1a3c@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 0998d2757218771c59d5ca59ccf13d1542a38f17 # git commit -s git send-email --to '' --in-reply-to '2026010500-endurance-wobble-1a3c@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0998d2757218771c59d5ca59ccf13d1542a38f17 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:20:01 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle alloc failures on dasmon_test_merge_regions_of() damon_test_merge_regions_of() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-8-sj@kernel.org Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [5.15+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index e8219fd23318..98f2a3de7cea 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -248,8 +248,14 @@ static void damon_test_merge_regions_of(struct kunit *test) int i; t = damon_new_target(); + if (!t) + kunit_skip(test, "target alloc fail"); for (i = 0; i < ARRAY_SIZE(sa); i++) { r = damon_new_region(sa[i], ea[i]); + if (!r) { + damon_free_target(t); + kunit_skip(test, "region alloc fail"); + } r->nr_accesses = nrs[i]; r->nr_accesses_bp = nrs[i] * 10000; damon_add_region(r, t); From - Mon Jan 05 11:17:56 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id wDlMHuCdW2mTrDEAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:17:52 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:17:52 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vciau-00000000ieE-0cH8 for hi@josie.lol; Mon, 05 Jan 2026 11:17:52 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id DDEAE30D8AD9 for ; Mon, 5 Jan 2026 11:12:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B6AE334C35; Mon, 5 Jan 2026 11:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="E76iWtqq" X-Original-To: stable@vger.kernel.org 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 471CB334C34 for ; Mon, 5 Jan 2026 11:06:00 +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=1767611161; cv=none; b=GT3gjLhcZJ+S2GyY1tocQ0dWctxK5+17BZ5387ZEQasRHSVqxaceEBRpaH+EVKSMrfE/HOEE4RRNk2F95vbCZAPfMkESt/S+zjegd5IRwjpwKvFKCxxMMWEU4c+HhlCaTi1Pa8wdLaJt5/W7i5bGwbhg5Q4Uqc7e+9r5EDizS+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767611161; c=relaxed/simple; bh=3Dm1sSunPB/bfmenNm5vRGeQVZsAFP0WzNEEYwmAsTc=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Qv0c7T68ffiBEFpil9avljtXRYo/PtTj1I46AjTwfNbjffxrWnxKsZVZx5d2Jt7GzCAJriw/hHcbVQFJIyTcfUzm5ZxTM1veIkQZexbYfCDEBf2hebZmXHzBgTQomMbC7W7ZwBhQXyRg1DQXVQIzxv0c5e502Smp5SpwOWMEPS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E76iWtqq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33299C116D0; Mon, 5 Jan 2026 11:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611160; bh=3Dm1sSunPB/bfmenNm5vRGeQVZsAFP0WzNEEYwmAsTc=; h=Subject:To:Cc:From:Date:From; b=E76iWtqqRv9mVphGrjv2PTdWjr6xZBnclapCC3Z9ahNn4FDduanP7Y4Tr61h9OJyW c/2bQ8Kae+sluwahE3u0l0gWiNiFso/Awn0uGFQlJsx833hs4LDuDHGZPY18fv9h4J x37t/WC5CumI77acSh2JsH0bqjmViIaClcf4TZGQ= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle alloc failures in" failed to apply to 6.1-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:05:49 +0100 Message-ID: <2026010549-bloated-activist-2c21@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [172.234.253.10 listed in list.dnswl.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 74d5969995d129fd59dd93b9c7daa6669cb6810f # git commit -s git send-email --to '' --in-reply-to '2026010549-bloated-activist-2c21@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 74d5969995d129fd59dd93b9c7daa6669cb6810f Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:20:04 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle alloc failures in damon_test_set_regions() damon_test_set_regions() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-11-sj@kernel.org Fixes: 62f409560eb2 ("mm/damon/core-test: test damon_set_regions") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [6.1+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index 96c8f1269f44..e38c95f86a68 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -368,13 +368,26 @@ static void damon_test_ops_registration(struct kunit *test) static void damon_test_set_regions(struct kunit *test) { struct damon_target *t = damon_new_target(); - struct damon_region *r1 = damon_new_region(4, 16); - struct damon_region *r2 = damon_new_region(24, 32); + struct damon_region *r1, *r2; struct damon_addr_range range = {.start = 8, .end = 28}; unsigned long expects[] = {8, 16, 16, 24, 24, 28}; int expect_idx = 0; struct damon_region *r; + if (!t) + kunit_skip(test, "target alloc fail"); + r1 = damon_new_region(4, 16); + if (!r1) { + damon_free_target(t); + kunit_skip(test, "region alloc fail"); + } + r2 = damon_new_region(24, 32); + if (!r2) { + damon_free_target(t); + damon_free_region(r1); + kunit_skip(test, "second region alloc fail"); + } + damon_add_region(r1, t); damon_add_region(r2, t); damon_set_regions(t, &range, 1, DAMON_MIN_REGION); From - Mon Jan 05 11:18:14 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id qJzTMvGdW2nUaAIAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:18:09 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:18:10 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vcibB-00000000kfX-2KGF for hi@josie.lol; Mon, 05 Jan 2026 11:18:09 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 4291530E42DE for ; Mon, 5 Jan 2026 11:12:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 185BC3168E3; Mon, 5 Jan 2026 11:03:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Di/8jz3L" X-Original-To: stable@vger.kernel.org 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 E3BF03164BE for ; Mon, 5 Jan 2026 11:03:53 +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=1767611034; cv=none; b=bWwMEJZf3WXVZZ8SVMMwD/AYUne4Jw4acKQcghioN5gtjvtIGvkYy9p9lm9DCIVtEcffefFMklDMDw2G3ueBqXN5d/iQ56wiP6L9yFZG2ZtKAs4a1QTtE8AVZCWnl5X7zClnRTgR329KzocoERW3xi9qV7WQP9RU7HQ10TjbKsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767611034; c=relaxed/simple; bh=aiv7dMTEMpsCuCMpPMpNy+31Y3hZcaJPyqVTCy9axxI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=e6+nV2WWozWPoUV9AaVbwrtFMKtjZvLFVSjP8oUKrMnDw8U7PyJ5zEyeS5vc8nj+QfHNacc+gEvMtNP25JzTU++/k+kzb+yrdyWIj71siXezUesk8FvZ8qL7hzabroupAcWH0LdgTNYQCejPlakvvWDRm5sZwsIpyphShhHWhGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Di/8jz3L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19408C116D0; Mon, 5 Jan 2026 11:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611033; bh=aiv7dMTEMpsCuCMpPMpNy+31Y3hZcaJPyqVTCy9axxI=; h=Subject:To:Cc:From:Date:From; b=Di/8jz3LSih4iW1/5DZenZw5r3LAUcyspkpacwuUwC82wgP4/x3uC+hePDVx8opyT rL3CJ9fZR90I7tMoByu6aQ6UXjrfxu2Vcke+83Hte05TL/Q2FTpE6tfxaqYTSQ4eKB EVINVAxMPwHEME5GmolIlI6XMsdkhhYZH+SuLIpc= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle alloc failres in" failed to apply to 6.12-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:03:50 +0100 Message-ID: <2026010550-tank-repugnant-eee6@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 28ab2265e9422ccd81e4beafc0ace90f78de04c4 # git commit -s git send-email --to '' --in-reply-to '2026010550-tank-repugnant-eee6@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 28ab2265e9422ccd81e4beafc0ace90f78de04c4 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:20:07 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle alloc failres in damon_test_new_filter() damon_test_new_filter() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-14-sj@kernel.org Fixes: 2a158e956b98 ("mm/damon/core-test: add a test for damos_new_filter()") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [6.6+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index b9bd69a57e62..03c7ac31db5c 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -505,6 +505,8 @@ static void damos_test_new_filter(struct kunit *test) struct damos_filter *filter; filter = damos_new_filter(DAMOS_FILTER_TYPE_ANON, true, false); + if (!filter) + kunit_skip(test, "filter alloc fail"); KUNIT_EXPECT_EQ(test, filter->type, DAMOS_FILTER_TYPE_ANON); KUNIT_EXPECT_EQ(test, filter->matching, true); KUNIT_EXPECT_PTR_EQ(test, filter->list.prev, &filter->list); From - Mon Jan 05 11:18:23 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id MGyrA/udW2nLRzgAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:18:19 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:18:19 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vcibK-00000000lD5-36SY for hi@josie.lol; Mon, 05 Jan 2026 11:18:19 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 6AAD730389A6 for ; Mon, 5 Jan 2026 11:12:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E14E31ED95; Mon, 5 Jan 2026 11:04:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DiQ2yuNr" X-Original-To: stable@vger.kernel.org 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 E889131ED63 for ; Mon, 5 Jan 2026 11:04:42 +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=1767611083; cv=none; b=Lg8BjuZI3B0s4bssWmAHBh5uq0OgvM60S8bUZzP8ARvLl44FfTkvnd045NymrkgaGNE17NcFHSOW5E0mT9bzHa2iYDXOaLHrj9JNxrogeJ+NgRkL+KmVFAwZKDZ0qgpWSHAqvcbEb6xQnihUHOkQQtpaQvriPynqcy6CE/4YsVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767611083; c=relaxed/simple; bh=V9i7p+IPf4aOaMLeRyHC2hXslBLnPvajkHE/8LihUR4=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=VSVlMF8tJTnbEZyLk8USp9Ebe7u4MGyOi4WyMuFrmNbIFYu7rL9CVwsAKLtz2rgnJfvQdmGHsH6g7NEpy5Y2kBoBSfa874t3keTRRjBu9UaccJAVFpWQ7ivScsQPciWPHla6Xi+7AMOSgOFmJP6isOHErQFYcBsR6nL+O23jrDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DiQ2yuNr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 569F8C19425; Mon, 5 Jan 2026 11:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611082; bh=V9i7p+IPf4aOaMLeRyHC2hXslBLnPvajkHE/8LihUR4=; h=Subject:To:Cc:From:Date:From; b=DiQ2yuNrhBjkPbvcnaXchPdo5/xhj802WMs69zw+3K2hrffnEnFJ8KNFFM1AAcLrL 1xWobRIIuF7M+JibRxZB/iyIRitSLmeZQtGdmbRun9oYzKUKS1w3ZIBE2NZrg+iL+W v0m+GrRChwQiUTUYK+sN+v66Oaewv4HaHHBA+o6w= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle memory failure from" failed to apply to 6.1-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:04:35 +0100 Message-ID: <2026010535-convent-enigmatic-f417@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [172.234.253.10 listed in list.dnswl.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x fafe953de2c661907c94055a2497c6b8dbfd26f3 # git commit -s git send-email --to '' --in-reply-to '2026010535-convent-enigmatic-f417@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From fafe953de2c661907c94055a2497c6b8dbfd26f3 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:19:57 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle memory failure from damon_test_target() damon_test_target() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-4-sj@kernel.org Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [5.15+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index a2c9ee7a5de1..6e8a605277a3 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -58,7 +58,14 @@ static void damon_test_target(struct kunit *test) struct damon_ctx *c = damon_new_ctx(); struct damon_target *t; + if (!c) + kunit_skip(test, "ctx alloc fail"); + t = damon_new_target(); + if (!t) { + damon_destroy_ctx(c); + kunit_skip(test, "target alloc fail"); + } KUNIT_EXPECT_EQ(test, 0u, nr_damon_targets(c)); damon_add_target(c, t); From - Mon Jan 05 11:18:29 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id yNqIOACeW2nLRzgAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:18:24 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:18:25 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vcibQ-00000000lLg-2Xx9 for hi@josie.lol; Mon, 05 Jan 2026 11:18:24 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 7772530ED965 for ; Mon, 5 Jan 2026 11:12:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A1E1331221; Mon, 5 Jan 2026 11:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xn9VGl0H" X-Original-To: stable@vger.kernel.org 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 EA00233121F for ; Mon, 5 Jan 2026 11:05:29 +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=1767611130; cv=none; b=Fs1mDO77hxX7BqdpdpJwlki4qvl9BDr+CNJfUJ/DvbuSGROWDfn+fJ73iBJrG+/wrAuJOAbyjstLtjGJCoTXcxoidFpth2jR4+pQCcQ/eoomqwHX6Oma3/3xj642PH0rKl4yFWgq4WVzMMOyCoSGEgsBI9zB4RCHtrG4L1gjz+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767611130; c=relaxed/simple; bh=yI9kk1dnoJASqCPdpyLay2HqKzSgAtxhymi9LAKMU2g=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=GngCxNGxqgcva3lXoU7WkqIk7/oo9gZv1cbhQIaiQ5E4ZGZnZFSU8zyONuv+/jMriJURxlTF5DY385VMMuUAO9xGBgFp35Lw81JzngfPimZVMz1IJYGSeARDgFKHMjteOvPG4iGgPBUCklIjOQsLUF3Eet/dTnUhPo2wWICQc0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xn9VGl0H; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A377C2BCB1; Mon, 5 Jan 2026 11:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611129; bh=yI9kk1dnoJASqCPdpyLay2HqKzSgAtxhymi9LAKMU2g=; h=Subject:To:Cc:From:Date:From; b=xn9VGl0HjX1lCNKORmGDqOJKpqWwdq6ruAq6zr9KIgnZUSbJG0iBqpav5ly/nrpkM +NMhPDNO9ZnD7LGoU47NMblBucUy1qfY/+JA90UaavBNUL5cgt+c5Tr03jomgJeiVi Ejk2MNOkvwOdF5Li6A3VX3stoF0pMv7DYqj40JSU= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle alloc failures on" failed to apply to 6.1-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:05:18 +0100 Message-ID: <2026010518-backhand-stood-34f4@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [172.234.253.10 listed in list.dnswl.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 3d443dd29a1db7efa587a4bb0c06a497e13ca9e4 # git commit -s git send-email --to '' --in-reply-to '2026010518-backhand-stood-34f4@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 3d443dd29a1db7efa587a4bb0c06a497e13ca9e4 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:20:00 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle alloc failures on damon_test_merge_two() damon_test_merge_two() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-7-sj@kernel.org Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [5.15+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index f5f3152cb8df..e8219fd23318 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -188,11 +188,21 @@ static void damon_test_merge_two(struct kunit *test) int i; t = damon_new_target(); + if (!t) + kunit_skip(test, "target alloc fail"); r = damon_new_region(0, 100); + if (!r) { + damon_free_target(t); + kunit_skip(test, "region alloc fail"); + } r->nr_accesses = 10; r->nr_accesses_bp = 100000; damon_add_region(r, t); r2 = damon_new_region(100, 300); + if (!r2) { + damon_free_target(t); + kunit_skip(test, "second region alloc fail"); + } r2->nr_accesses = 20; r2->nr_accesses_bp = 200000; damon_add_region(r2, t); From - Mon Jan 05 11:18:49 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id oFtGDhaeW2mTrDEAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:18:46 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:18:46 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vcibl-00000000lxW-3nE6 for hi@josie.lol; Mon, 05 Jan 2026 11:18:46 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 176DD303A1A0 for ; Mon, 5 Jan 2026 11:12:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18EEA331A63; Mon, 5 Jan 2026 11:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lfsX93O2" X-Original-To: stable@vger.kernel.org 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 E95C1331A62 for ; Mon, 5 Jan 2026 11:05:36 +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=1767611137; cv=none; b=a3WnD7ae5GdZ5AyLFy8j0Gdj6gpNnsrS9yxywd2g8JpH2heDCQGIGcAyrYPkOLk3/163JIs63H/tyscKDLLILKsN375ooRUINk46HisCS/ZLOCI07//A2QcGKB7rRxxMYom21T6DfaAhTcbR1fYhHxhVXbunvufWa+nN76NHaqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767611137; c=relaxed/simple; bh=FvfqA0eLXpjHScWLLAbId5kbipt2YWs0vmeMJTBOo48=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=kGQSXum7JRP4QYQB7xp05CXQJL84x0TBJXkNFulsI75bOs1/3Mjy12ut+KVZ1fbUpxR5ndruBmaAAMwz2jqirMoyiTTpsT3WDJp7wrdtIsx7ZEjig5teOtej1jDAlOmagM768+Pn45i9Pbg0apPWKXH2UjyuqGSM7SVLfvmPtF4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lfsX93O2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37EB4C19425; Mon, 5 Jan 2026 11:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767611136; bh=FvfqA0eLXpjHScWLLAbId5kbipt2YWs0vmeMJTBOo48=; h=Subject:To:Cc:From:Date:From; b=lfsX93O2GTHFFtbAc3jx4FEz1vYpwQfAwI4w9kVoLKtI11uIO0gHA5aOdS1jmTyIu 0/kawI14P894ZnyU3lGD9/88yRwpmdOeRRxXksjhXmTOfbBtTOm27hLOuly7TTtlBR 7hCHF8xwqBMFxsOVzcrq+AjUHS5W0q+EHm8jhfT0= Subject: FAILED: patch "[PATCH] mm/damon/tests/core-kunit: handle alloc failures on" failed to apply to 6.6-stable tree To: sj@kernel.org,akpm@linux-foundation.org,brendan.higgins@linux.dev,davidgow@google.com,stable@vger.kernel.org,wangkefeng.wang@huawei.com Cc: From: Date: Mon, 05 Jan 2026 12:05:33 +0100 Message-ID: <2026010533-uncounted-stuffing-5fb6@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-DKIM: signer='linuxfoundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (0.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linuxfoundation.org] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [172.234.253.10 listed in list.dnswl.org] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender SpamTally: Final spam score: 4 The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x eded254cb69044bd4abde87394ea44909708d7c0 # git commit -s git send-email --to '' --in-reply-to '2026010533-uncounted-stuffing-5fb6@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From eded254cb69044bd4abde87394ea44909708d7c0 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 1 Nov 2025 11:20:02 -0700 Subject: [PATCH] mm/damon/tests/core-kunit: handle alloc failures on damon_test_split_regions_of() damon_test_split_regions_of() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases. Link: https://lkml.kernel.org/r/20251101182021.74868-9-sj@kernel.org Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Kefeng Wang Cc: [5.15+] Signed-off-by: Andrew Morton diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index 98f2a3de7cea..10618cdd188e 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -278,15 +278,35 @@ static void damon_test_split_regions_of(struct kunit *test) struct damon_target *t; struct damon_region *r; + if (!c) + kunit_skip("ctx alloc fail"); t = damon_new_target(); + if (!t) { + damon_destroy_ctx(c); + kunit_skip(test, "target alloc fail"); + } r = damon_new_region(0, 22); + if (!r) { + damon_destroy_ctx(c); + damon_free_target(t); + kunit_skip(test, "region alloc fail"); + } damon_add_region(r, t); damon_split_regions_of(t, 2, DAMON_MIN_REGION); KUNIT_EXPECT_LE(test, damon_nr_regions(t), 2u); damon_free_target(t); t = damon_new_target(); + if (!t) { + damon_destroy_ctx(c); + kunit_skip(test, "second target alloc fail"); + } r = damon_new_region(0, 220); + if (!r) { + damon_destroy_ctx(c); + damon_free_target(t); + kunit_skip(test, "second region alloc fail"); + } damon_add_region(r, t); damon_split_regions_of(t, 4, DAMON_MIN_REGION); KUNIT_EXPECT_LE(test, damon_nr_regions(t), 4u); From - Mon Jan 05 11:19:06 2026 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: hi@josie.lol Received: from witcher.mxrouting.net by witcher.mxrouting.net with LMTP id cOgHOyaeW2mNrgEAYBR5ng (envelope-from ) for ; Mon, 05 Jan 2026 11:19:02 +0000 Return-path: Envelope-to: hi@josie.lol Delivery-date: Mon, 05 Jan 2026 11:19:03 +0000 Received: from sea.lore.kernel.org ([172.234.253.10]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1vcic2-00000000myZ-2mTb for hi@josie.lol; Mon, 05 Jan 2026 11:19:02 +0000 Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id AB54731076C4 for ; Mon, 5 Jan 2026 11:12:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83A33333442; Mon, 5 Jan 2026 11:05:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="samgWXlg" X-Original-To: stable@vger.kernel.org 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.kernel74-4de5-8815-cf6857f5362a","timestamp":"2026-02-26T12:58:54.861Z"} {"parentUuid":"7f877ce4-0874-4de5-8815-cf6857f5362a","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:mcp__plugin_playwright_playwright__browser_run_code","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.py"},"parentToolUseID":"toolu_01JijNJfrKZovoMoZRgPK3jW","toolUseID":"toolu_01JijNJfrKZovoMoZRgPK3jW","timestamp":"2026-02-26T12:58:54.865Z","uuid":"aeb6f612-cd76-431d-9879-16bbd0c64a68"} {"parentUuid":"b71919c7-7e98-4dc2-a549-24dd56943a39","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01JijNJfrKZovoMoZRgPK3jW","type":"tool_result","content":[{"type":"text","text":"### Result\n\"cleared\"\n### Ran Playwright code\n```js\nawait (async (page) => {\n // Clear the CSS Override textarea first\n const textarea = page.getByLabel('CSS Override');\n await textarea.click();\n await page.keyboard.press('ControlOrMeta+a');\n await page.keyboard.press('Delete');\n return 'cleared';\n})(page);\n```"}]}]},"uuid":"6cbf9532-0d7d-4756-8e78-47d90c335739","timestamp":"2026-02-26T12:58:54.911Z","toolUseResult":[{"type":"text","text":"### Result\n\"cleared\"\n### Ran Playwright code\n```js\nawait (async (page) => {\n // Clear the CSS Override textarea first\n const textarea = page.getByLabel('CSS Override');\n await textarea.click();\n await page.keyboard.press('ControlOrMeta+a');\n await page.keyboard.press('Delete');\n return 'cleared';\n})(page);\n```"}],"sourceToolAssistantUUID":"b71919c7-7e98-4dc2-a549-24dd56943a39"} {"parentUuid":"6cbf9532-0d7d-4756-8e78-47d90c335739","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"system","subtype":"api_error","level":"error","cause":{},"error":{"cause":{}},"retryInMs":532.5767020078722,"retryAttempt":1,"maxRetries":10,"timestamp":"2026-02-26T12:58:55.306Z","uuid":"3774c816-50fa-4e12-9333-968c66b6df60"} {"parentUuid":"3774c816-50fa-4e12-9333-968c66b6df60","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","message":{"model":"claude-opus-4-6","id":"msg_01T8oqhpsT4UF2xwNnetMnpT","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"I need to paste the CSS content into the textarea. Since I can't use `require('fs')` in the Playwright context, I'll need to read the file content and pass it via evaluate. Let me use the clipboard approach or fill the textarea via page.evaluate with the CSS content passed as a parameter.","signature":"EsoDCkYICxgCKkAcAdX4wSiR77tuGhWX/0veU79bwEboESgf+qstpDPgm6DEmGqJR78DJ7C/fj4tQdoix7LGNuqHpImMdvbaoXu0Egxy3ZtK3ByLMCn9HQwaDIdL+90x5ztRJMVRuiIwpqx1Gb5T5VJqTT8XPosP0qpPoDMmW38aKK4Ptgns0LjadCjxmQvFzY4a32dVX3dYKrECTlp1cS0UpFjUrRV6RU/Tr8330eCuwlJe4G7pCKRzcFoeFVhq4q7I3DLo0jHvGLiitOvRn2IXUk5rDsOCv/jCtYZFGmEDfHCsFv3yw8yHvWHX2XlVdhNa26hwJ9UMIv+wfk8jXiT5lB5N2YsQb5YEzG4c9xcGAB3RxZv7f2ndl3simi4SUOon0l+p76CjEDJXiFXtZKDFXjXKYeYiSUm2dNfwGmevfpmYj6ezVp8ZWarVTE7DbG3PP1N5JfpXGv0X6HkaXoCbK4tGQsauWEGcCziK4xM0hRDJ3N/PJoW5459LrKQIE0pygr9GFAngf6V5hOfZHP16oRLDr23nvHrrEksB2x0fI7c0JFVlyzIG+rOhFPwtNKmqk9/5pECBgF06GewjGP/XsFgG8MAL3LFCrigYAQ=="}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":431,"cache_read_input_tokens":152863,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":431},"output_tokens":8,"service_tier":"standard","inference_geo":"not_available"}},"requestId":"req_011CYWikYwnLd4Ba1UjTYpyC","type":"assistant","uuid":"a1b260b0-aba7-4732-b7eb-6c6cc2bb607e","timestamp":"2026-02-26T12:59:00.904Z"} {"parentUuid":"a1b260b0-aba7-4732-b7eb-6c6cc2bb607e","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","message":{"model":"claude-opus-4-6","id":"msg_01T8oqhpsT4UF2xwNnetMnpT","type":"message","role":"assistant","content":[{"type":"text","text":"Now I need to paste the updated CSS. Let me use `page.evaluate` to set the textarea value directly."}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":431,"cache_read_input_tokens":152863,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":431},"output_tokens":8,"service_tier":"standard","inference_geo":"not_available"}},"requestId":"req_011CYWikYwnLd4Ba1UjTYpyC","type":"assistant","uuid":"c06b5303-c497-4f56-ab9e-c18150099a41","timestamp":"2026-02-26T12:59:01.615Z"} {"parentUuid":"c06b5303-c497-4f56-ab9e-c18150099a41","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","message":{"model":"claude-opus-4-6","id":"msg_01T8oqhpsT4UF2xwNnetMnpT","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01YSb5udyhTtr6ERKrYyUunT","name":"Bash","input":{"command":"wc -c /home/josie/development/personal/josiedot/cloud/wikijs/custom-theme.css","description":"Check CSS file size"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":431,"cache_read_input_tokens":152863,"output_tokens":204,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":431,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"}},"requestId":"req_011CYWikYwnLd4Ba1UjTYpyC","type":"assistant","uuid":"9d24fad7-21da-4a03-afc9-e66198c94709","timestamp":"2026-02-26T12:59:02.627Z"} {"parentUuid":"9d24fad7-21da-4a03-afc9-e66198c94709","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"progress","data":{"type":"hook_progress","hookEvent":"PreToolUse","hookName":"PreToolUse:Bash","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse.py"},"toolUseID":"toolu_01YSb5udyhTtr6ERKrYyUunT","parentToolUseID":"toolu_01YSb5udyhTtr6ERKrYyUunT","uuid":"ef959c8e-363a-4db0-b30f-13dbb3a931d3","timestamp":"2026-02-26T12:59:02.628Z"} {"parentUuid":"ef959c8e-363a-4db0-b30f-13dbb3a931d3","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Bash","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.py"},"parentToolUseID":"toolu_01YSb5udyhTtr6ERKrYyUunT","toolUseID":"toolu_01YSb5udyhTtr6ERKrYyUunT","timestamp":"2026-02-26T12:59:02.903Z","uuid":"d6d0c7df-2c69-4df5-92f1-920ba29bed33"} {"parentUuid":"9d24fad7-21da-4a03-afc9-e66198c94709","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01YSb5udyhTtr6ERKrYyUunT","type":"tool_result","content":"18403 /home/josie/development/personal/josiedot/cloud/wikijs/custom-theme.css","is_error":false}]},"uuid":"123175cc-8c73-49c1-9cbf-2b4820263531","timestamp":"2026-02-26T12:59:02.902Z","toolUseResult":{"stdout":"18403 /home/josie/development/personal/josiedot/cloud/wikijs/custom-theme.css","stderr":"","interrupted":false,"isImage":false,"noOutputExpected":false},"sourceToolAssistantUUID":"9d24fad7-21da-4a03-afc9-e66198c94709"} {"parentUuid":"123175cc-8c73-49c1-9cbf-2b4820263531","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot","sessionId":"c514f1c3-0c37-43cf-8aa4-6f853eaddd4f","version":"2.1.59","gitBranch":"main","slug":"serene-munching-planet","message":{"model":"claude-opus-4-6","id":"msg_013KETisXayxiTE4rUfj8j62","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01V1LTz587bfgskMMJSMaXkf","name":"mcp__plugin_playwright_playwright__browser_run_code","input":{"code":"async (page) => {\n const textarea = page.getByLabel('CSS Override');\n await textarea.fill(`@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');\n:root{--jw-font-sans:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;--jw-font-mono:'IBM Plex Mono','SF Mono','Monaco','Inconsolata','Fira Code',monospace;--jw-bg-primary:#f6f6f6;--jw-bg-secondary:#ffffff;--jw-bg-tertiary:#e0e0e0;--jw-text-primary:#333333;--jw-text-secondary:#666666;--jw-text-tertiary:#999999;--jw-border:#e0e0e0;--jw-accent:#000000;--jw-accent-hover:#333333;--jw-dark-bg:#1a1a1a;--jw-dark-bg3:#333333;--jw-dark-bg4:#404040;--jw-dark-text:#e0e0e0;--jw-dark-text2:#a0a0a0;--jw-dark-text3:#707070}\n.v-application{font-family:var(--jw-font-sans)!important}\n.v-application .headline,.v-application .title,.v-application .subtitle-1,.v-application .subtitle-2,.v-application .body-1,.v-application .body-2,.v-application .caption,.v-application .overline,.v-application .v-btn,.v-application .v-card,.v-application .v-list,.v-application .v-toolbar,.v-application .v-navigation-drawer,.v-application .v-footer,.v-application input,.v-application textarea{font-family:var(--jw-font-sans)!important}\nheader.nav-header,header.nav-header .nav-header-inner{background-color:#000000!important}\nheader.nav-header .v-toolbar__content{font-family:var(--jw-font-sans)!important}\nheader.nav-header .v-input__slot{background-color:var(--jw-dark-bg3)!important;border-radius:4px!important;border:none!important}\nheader.nav-header .v-text-field input,header.nav-header .search-input input{background-color:var(--jw-dark-bg3)!important;color:var(--jw-dark-text)!important;border-radius:4px!important;border:none!important}\nheader.nav-header .v-text-field input::placeholder,header.nav-header .search-input input::placeholder{color:var(--jw-text-tertiary)!important}\nheader.nav-header .v-label{color:var(--jw-text-tertiary)!important}\nheader.nav-header .v-icon,header.nav-header .v-btn .v-icon{color:var(--jw-text-tertiary)!important;transition:color 150ms ease-in-out}\nheader.nav-header .v-icon:hover,header.nav-header .v-btn:hover .v-icon{color:#ffffff!important}\nheader.nav-header .v-btn{color:var(--jw-text-tertiary)!important}\nheader.nav-header .v-btn:hover{color:#ffffff!important}\nheader.nav-header .org-name{font-family:var(--jw-font-mono)!important;letter-spacing:-0.025em!important}\n.v-navigation-drawer{background-color:var(--jw-dark-bg)!important}\n.v-navigation-drawer .v-navigation-drawer__border{display:none!important}\n.v-navigation-drawer .v-list{background-color:var(--jw-dark-bg)!important}\n.v-navigation-drawer .v-list-item{color:var(--jw-dark-text)!important;font-size:0.875rem!important;transition:background-color 150ms ease-in-out,color 150ms ease-in-out}\n.v-navigation-drawer .v-list-item .v-list-item__title{color:var(--jw-dark-text)!important;font-size:0.875rem!important;font-family:var(--jw-font-sans)!important}\n.v-navigation-drawer .v-list-item:hover{background-color:var(--jw-dark-bg3)!important}\n.v-navigation-drawer .v-list-item--active,.v-navigation-drawer .v-list-item.v-list-item--active{background-color:var(--jw-dark-bg4)!important}\n.v-navigation-drawer .v-list-item--active .v-list-item__ti