[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240618034723.2122429-1-xiujianfeng@huawei.com>
Date: Tue, 18 Jun 2024 03:47:23 +0000
From: Xiu Jianfeng <xiujianfeng@...wei.com>
To: <akpm@...ux-foundation.org>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] mm/hugetlb_cgroup: register lockdep key for cftype
The commit e18df2889ff9 ("mm/hugetlb_cgroup: prepare cftypes based on
template") has changed the cftypes from static allocated objects to
dynamic ones, so the cft->lockdep_key should be registered proactively.
Fixes: e18df2889ff9 ("mm/hugetlb_cgroup: prepare cftypes based on template")
Reported-by: kernel test robot <oliver.sang@...el.com>
Closes: https://lore.kernel.org/oe-lkp/202406181046.8d8b2492-oliver.sang@intel.com
Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
---
mm/hugetlb_cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index 2b899c4ae968..4ff238ba1250 100644
--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -836,6 +836,8 @@ hugetlb_cgroup_cfttypes_init(struct hstate *h, struct cftype *cft,
cft->file_offset = MEMFILE_OFFSET0(offset) +
MEMFILE_FIELD_SIZE(offset) * idx;
}
+
+ lockdep_register_key(&cft->lockdep_key);
}
}
--
2.34.1
Powered by blists - more mailing lists