From: Xiu Jianfeng <xiujianfeng@huawei.com>
To: <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH -next] mm/hugetlb_cgroup: register lockdep key for cftype
Date: Tue, 18 Jun 2024 03:47:23 +0000 [thread overview]
Message-ID: <20240618034723.2122429-1-xiujianfeng@huawei.com> (raw)
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@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202406181046.8d8b2492-oliver.sang@intel.com
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.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
reply other threads:[~2024-06-18 3:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618034723.2122429-1-xiujianfeng@huawei.com \
--to=xiujianfeng@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox