LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Y Song <ys114321@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Alban Crequy <alban.crequy@gmail.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, cgroups@vger.kernel.org,
Alban Crequy <alban@kinvolk.io>,
tj@kernel.org
Subject: Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino
Date: Wed, 23 May 2018 10:57:06 +0200 [thread overview]
Message-ID: <ef833a5c-8307-fee7-26ec-057f623a9049@iogearbox.net> (raw)
In-Reply-To: <CAH3MdRVwmKd84ePvNX+NuAj3TfA_28BObEmzBqGXv=P5_A=8fQ@mail.gmail.com>
On 05/23/2018 06:31 AM, Y Song wrote:
> On Tue, May 22, 2018 at 8:35 PM, Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
>> On Tue, May 22, 2018 at 08:33:24PM -0700, Y Song wrote:
>>> + struct cgroup *cgrp = task_dfl_cgroup(current);
>>> + if (!cgrp)
>>> + return -EINVAL;
>>
>> why this check is needed?
>
> No reason :-) Originally I am concerned whether it is possible cgrp
> could be NULL.
> By looking at the code, it SEEMS to me that it could not be NULL, but I am not
> 100% sure (as I am not a cgroup expert). Since you are asking,
> probably means it cannot be NULL, so will remove it in formal upstream patch.
Aside from this the cgrp->kn->id.id is also u64, so overlapping this with
error codes we'll get into a similar issue as with bpf_perf_event_read().
next prev parent reply other threads:[~2018-05-23 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-13 17:33 Alban Crequy
2018-05-14 19:38 ` Y Song
2018-05-21 13:52 ` Alban Crequy
2018-05-21 16:26 ` Alexei Starovoitov
2018-05-22 0:24 ` Y Song
2018-05-23 3:33 ` Y Song
2018-05-23 3:35 ` Alexei Starovoitov
2018-05-23 4:31 ` Y Song
2018-05-23 8:57 ` Daniel Borkmann [this message]
2018-05-25 15:21 ` Alban Crequy
2018-05-25 16:28 ` Y Song
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=ef833a5c-8307-fee7-26ec-057f623a9049@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alban.crequy@gmail.com \
--cc=alban@kinvolk.io \
--cc=alexei.starovoitov@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tj@kernel.org \
--cc=ys114321@gmail.com \
--subject='Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).