]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.2: Fix missing removal of SLAB_ACCOUNT on kmem_cache allocation
authorMuchun Song <songmuchun@bytedance.com>
Fri, 1 Apr 2022 02:59:05 +0000 (10:59 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 7 Apr 2022 20:20:00 +0000 (16:20 -0400)
commit94e142b3fc961c69208d863c31f5c724a9664c62
tree1e5778cd7b275e1408195311d46f71d22eb82513
parentdcf0e7a5201cd89da531c5bf4c6ce0563a6bbd7c
NFSv4.2: Fix missing removal of SLAB_ACCOUNT on kmem_cache allocation

The commit 21d3d292b256 ("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/
Fixes: 21d3d292b256 ("NFSv4.2: Fix up an invalid combination of memory allocation flags")
Fixes: ed5c0eace834 ("mm: list_lru: allocate list_lru_one only when needed")
Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs42xattr.c