Re: [PATCH 3/4] fs/resctrl: Fix deadlock for errors during mount

From: Chen, Yu C

Date: Tue May 12 2026 - 03:29:04 EST


On 5/12/2026 6:53 AM, Reinette Chatre wrote:
Hi Tony,

On 5/8/26 11:21 AM, Tony Luck wrote:

+ * Obtain reference with locks held to protect against interference
+ * from resctrl_exit().
+ */
+ kernfs_get(rdt_root_kn);

[ ... ]

@@ -3130,6 +3144,7 @@ static int rdt_get_tree(struct fs_context *fc)
*/
if (!ctx->kfc.new_sb_created)
resctrl_unmount();
+ kernfs_put(rdt_root_kn);

I wonder if above should be protected against
cpus_read_lock();
mutex_lock(&rdtgroup_mutex);
like kernfs_get()?

thanks,
Chenyu