Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933265AbbLWQPd (ORCPT ); Wed, 23 Dec 2015 11:15:33 -0500 Received: from mail-yk0-f179.google.com ([209.85.160.179]:36309 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932302AbbLWQP2 (ORCPT ); Wed, 23 Dec 2015 11:15:28 -0500 Date: Wed, 23 Dec 2015 11:15:26 -0500 From: Tejun Heo To: serge.hallyn@ubuntu.com Cc: linux-kernel@vger.kernel.org, adityakali@google.com, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, lxc-devel@lists.linuxcontainers.org, akpm@linux-foundation.org, ebiederm@xmission.com, gregkh@linuxfoundation.org, lizefan@huawei.com, hannes@cmpxchg.org, Serge Hallyn Subject: Re: [PATCH 3/8] cgroup: introduce cgroup namespaces Message-ID: <20151223161526.GG5003@mtj.duckdns.org> References: <1450844609-9194-1-git-send-email-serge.hallyn@ubuntu.com> <1450844609-9194-4-git-send-email-serge.hallyn@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450844609-9194-4-git-send-email-serge.hallyn@ubuntu.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 797 Lines: 28 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/