* + mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch added to mm-unstable branch
@ 2022-11-10 3:31 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-11-10 3:31 UTC (permalink / raw)
To: mm-commits, ying.huang, weixugc, aneesh.kumar, linmq006, akpm
The patch titled
Subject: mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init
has been added to the -mm mm-unstable branch. Its filename is
mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Miaoqian Lin <linmq006@gmail.com>
Subject: mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init
Date: Thu, 10 Nov 2022 07:07:51 +0400
alloc_memory_type() returns error pointers on error instead of NULL. Use
IS_ERR() to check the return value to fix this.
Link: https://lkml.kernel.org/r/20221110030751.1627266-1-linmq006@gmail.com
Fixes: 7b88bda3761b ("mm/demotion/dax/kmem: set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Wei Xu <weixugc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory-tiers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memory-tiers.c~mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init
+++ a/mm/memory-tiers.c
@@ -645,7 +645,7 @@ static int __init memory_tier_init(void)
* than default DRAM tier.
*/
default_dram_type = alloc_memory_type(MEMTIER_ADISTANCE_DRAM);
- if (!default_dram_type)
+ if (IS_ERR(default_dram_type))
panic("%s() failed to allocate default DRAM tier\n", __func__);
/*
_
Patches currently in -mm which might be from linmq006@gmail.com are
mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-10 3:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 3:31 + mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch added to mm-unstable branch 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.