* [merged mm-hotfixes-stable] mm-mempolicy-fix-incorrect-freeing-of-wi_kobj.patch removed from -mm tree
@ 2025-06-06 5:02 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-06-06 5:02 UTC (permalink / raw)
To: mm-commits, ziy, ying.huang, rakie.kim, matthew.brost, lkp,
gourry, david, byungchul, apopple, joshua.hahnjy, akpm
The quilt patch titled
Subject: mm/mempolicy: fix incorrect freeing of wi_kobj
has been removed from the -mm tree. Its filename was
mm-mempolicy-fix-incorrect-freeing-of-wi_kobj.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Joshua Hahn <joshua.hahnjy@gmail.com>
Subject: mm/mempolicy: fix incorrect freeing of wi_kobj
Date: Mon, 2 Jun 2025 09:23:39 -0700
We should not free wi_group->wi_kobj here. In the error path of
add_weighted_interleave_group() where this snippet is called from,
kobj_{del, put} is immediately called right after this section. Thus, it
is not only unnecessary but also incorrect to free it here.
Link: https://lkml.kernel.org/r/20250602162345.2595696-1-joshua.hahnjy@gmail.com
Fixes: e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning")
Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506011545.Fduxqxqj-lkp@intel.com/
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Mathew Brost <matthew.brost@intel.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mempolicy.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/mm/mempolicy.c~mm-mempolicy-fix-incorrect-freeing-of-wi_kobj
+++ a/mm/mempolicy.c
@@ -3708,15 +3708,13 @@ static void wi_state_free(void)
lockdep_is_held(&wi_state_lock));
if (!old_wi_state) {
mutex_unlock(&wi_state_lock);
- goto out;
+ return;
}
rcu_assign_pointer(wi_state, NULL);
mutex_unlock(&wi_state_lock);
synchronize_rcu();
kfree(old_wi_state);
-out:
- kfree(&wi_group->wi_kobj);
}
static struct kobj_attribute wi_auto_attr =
_
Patches currently in -mm which might be from joshua.hahnjy@gmail.com are
mm-mempolicy-skip-unnecessary-synchronize_rcu.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-06 5:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 5:02 [merged mm-hotfixes-stable] mm-mempolicy-fix-incorrect-freeing-of-wi_kobj.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.