Skip to content
Commit dcc7977c authored by Muchun Song's avatar Muchun Song Committed by Trond Myklebust
Browse files

NFSv4.2: Fix missing removal of SLAB_ACCOUNT on kmem_cache allocation

The commit 5c60e89e ("NFSv4.2: Fix up an invalid combination of memory
allocation flags") has stripped GFP_KERNEL_ACCOUNT down to GFP_KERNEL,
however, it forgot to remove SLAB_ACCOUNT from kmem_cache allocation.
It means that memory is still limited by kmemcg.  This patch also fix a
NULL pointer reference issue [1] reported by NeilBrown.

Link: https://lore.kernel.org/all/164870069595.25542.17292003658915487357@noble.neil.brown.name/

 [1]
Fixes: 5c60e89e ("NFSv4.2: Fix up an invalid combination of memory allocation flags")
Fixes: 5abc1e37 ("mm: list_lru: allocate list_lru_one only when needed")
Reported-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent f0043206
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment