Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297527

Re: [PATCH 3/8] cgroup: introduce cgroup namespaces

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/8] cgroup: introduce cgroup namespaces
Date 2015-12-23 17:20 +0100
Message-ID <qIUiR-3tm-5@gated-at.bofh.it> (permalink)
References <qIJdM-4TG-5@gated-at.bofh.it> <qIJdM-4TG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Tue, Dec 22, 2015 at 10:23:24PM -0600, serge.hallyn@ubuntu.com wrote:
...
> +char *cgroup_path(struct cgroup *cgrp, char *buf, size_t buflen)
> +{
> +	int ret;
> +	
> +	ret = cgroup_path_ns(cgrp, buf, buflen, current->nsproxy->cgroup_ns);
> +	if (ret < 0 || ret >= buflen)
> +		return NULL;
> +	return buf;
> +}
> +EXPORT_SYMBOL_GPL(cgroup_path);

Shouldn't this function check whether it's being called from a task
context?  e.g. it could be being called from an irq handler and may
end up scoping the path incorrectly.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/8] cgroup: introduce cgroup namespaces serge.hallyn@ubuntu.com - 2015-12-23 05:30 +0100
  Re: [PATCH 3/8] cgroup: introduce cgroup namespaces Tejun Heo <tj@kernel.org> - 2015-12-23 17:20 +0100
    Re: [PATCH 3/8 v8.2] cgroup: introduce cgroup namespaces "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2015-12-23 20:40 +0100

csiph-web