Headline
CVE-2023-23005: mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init · torvalds/linux@4a625ce
** DISPUTED ** In the Linux kernel before 6.2, mm/memory-tiers.c misinterprets the alloc_memory_type return value (expects it to be NULL in the error case, whereas it is actually an error pointer). NOTE: this is disputed by third parties because there are no realistic cases in which a user can cause the alloc_memory_type error case to be reached.
Permalink
Browse files
mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init
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/[email protected] Fixes: 7b88bda (“mm/demotion/dax/kmem: set node’s abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE”) Signed-off-by: Miaoqian Lin [email protected] Reviewed-by: “Huang, Ying” [email protected] Cc: Aneesh Kumar K.V [email protected] Cc: Wei Xu [email protected] Signed-off-by: Andrew Morton [email protected]
- Loading branch information