[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3aa246ceac2e67bc8e06fcf6a0aad6878ab209f5.camel@intel.com>
Date: Fri, 19 Apr 2024 22:21:50 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Mehta, Sohil" <sohil.mehta@...el.com>, "mingo@...hat.com"
<mingo@...hat.com>, "jarkko@...nel.org" <jarkko@...nel.org>, "x86@...nel.org"
<x86@...nel.org>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "cgroups@...r.kernel.org"
<cgroups@...r.kernel.org>, "hpa@...or.com" <hpa@...or.com>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>, "mkoutny@...e.com"
<mkoutny@...e.com>, "haitao.huang@...ux.intel.com"
<haitao.huang@...ux.intel.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
"tj@...nel.org" <tj@...nel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>
CC: "mikko.ylinen@...ux.intel.com" <mikko.ylinen@...ux.intel.com>,
"seanjc@...gle.com" <seanjc@...gle.com>, "anakrish@...rosoft.com"
<anakrish@...rosoft.com>, "Zhang, Bo" <zhanb@...rosoft.com>,
"kristen@...ux.intel.com" <kristen@...ux.intel.com>, "yangjie@...rosoft.com"
<yangjie@...rosoft.com>, "Li, Zhiquan1" <zhiquan1.li@...el.com>,
"chrisyan@...rosoft.com" <chrisyan@...rosoft.com>
Subject: Re: [PATCH v12 05/14] x86/sgx: Implement basic EPC misc cgroup
functionality
> Documentation of task_get_css() says it always
> returns a valid css. This function is used by get_current_misc_cg() to get
> the css refernce.
>
>
> /**
> * task_get_css - find and get the css for (task, subsys)
> * @task: the target task
> * @subsys_id: the target subsystem ID
> *
> * Find the css for the (@task, @subsys_id) combination, increment a
> * reference on and return it. This function is guaranteed to return a
> * valid css. The returned css may already have been offlined.
> */
> static inline struct cgroup_subsys_state *
> task_get_css(struct task_struct *task, int subsys_id)
Ah, I missed this comment.
This confirms my code reading too.
>
>
> If you look at the code of this function, you will see it does not check
> NULL either for task_css().
>
> So I think we are pretty sure here it's confirmed by this documentation
> and testing.
Yeah agreed. Thanks.
Powered by blists - more mailing lists