[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241007055133.GA1333@redhat.com>
Date: Mon, 7 Oct 2024 07:51:34 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: luca.boccassi@...il.com
Cc: linux-kernel@...r.kernel.org, christian@...uner.io
Subject: Re: [PATCH v6] pidfd: add ioctl to retrieve pid info
On 10/06, luca.boccassi@...il.com wrote:
>
> +#ifdef CONFIG_CGROUPS
> + if (request_mask & PIDFD_INFO_CGROUPID) {
> + rcu_read_lock();
> + struct cgroup *cgrp = task_cgroup(task, pids_cgrp_id);
> + if (!cgrp)
> + return -ENODEV;
return without rcu_read_unlock().
And iirc this is against the coding style, "struct cgroup *cgrp" should
be declared at the start of block.
Oleg.
Powered by blists - more mailing lists