Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190908221954.GD1131@ZenIV.linux.org.uk>
Date: Sun, 8 Sep 2019 23:19:54 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Mickaël Salaün <mic@...ikod.net>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
	Mickaël Salaün <mickael.salaun@....gouv.fr>,
	linux-kernel@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Lutomirski <luto@...capital.net>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Casey Schaufler <casey@...aufler-ca.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	David Drysdale <drysdale@...gle.com>,
	"David S . Miller" <davem@...emloft.net>,
	"Eric W . Biederman" <ebiederm@...ssion.com>,
	James Morris <jmorris@...ei.org>, Jann Horn <jann@...jh.net>,
	John Johansen <john.johansen@...onical.com>,
	Jonathan Corbet <corbet@....net>, Kees Cook <keescook@...omium.org>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Paul Moore <paul@...l-moore.com>, Sargun Dhillon <sargun@...gun.me>,
	"Serge E . Hallyn" <serge@...lyn.com>,
	Shuah Khan <shuah@...nel.org>, Stephen Smalley <sds@...ho.nsa.gov>,
	Tejun Heo <tj@...nel.org>,
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	Thomas Graf <tgraf@...g.ch>, Tycho Andersen <tycho@...ho.ws>,
	Will Drewry <wad@...omium.org>, kernel-hardening@...ts.openwall.com,
	linux-api@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-security-module@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type:
 inode

On Mon, Sep 09, 2019 at 12:09:57AM +0200, Mickaël Salaün wrote:

> >>> +    rcu_read_lock();
> >>> +    ptr = htab_map_lookup_elem(map, &inode);
> >>> +    iput(inode);

Wait a sec.  You are doing _what_ under rcu_read_lock()?

> >>> +    if (IS_ERR(ptr)) {
> >>> +            ret = PTR_ERR(ptr);
> >>> +    } else if (!ptr) {
> >>> +            ret = -ENOENT;
> >>> +    } else {
> >>> +            ret = 0;
> >>> +            copy_map_value(map, value, ptr);
> >>> +    }
> >>> +    rcu_read_unlock();

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.