[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2258932.1761576956@warthog.procyon.org.uk>
Date: Mon, 27 Oct 2025 14:55:56 +0000
From: David Howells <dhowells@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: dhowells@...hat.com, Alexey Gladkov <legion@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mateusz Guzik <mjguzik@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/1] kill task_ucounts()->rcu_read_lock(), add __task_ucounts()
Oleg Nesterov <oleg@...hat.com> wrote:
> So I think task_ucounts() can just do
>
> /* The caller must ensure that ->real_cred is stable or take rcu_read_lock() */
> #define task_ucounts(task) \
> rcu_dereference_check((task)->real_cred, 1)->ucounts
Can you use rcu_access_pointer() within exit.c? E.g.:
struct cred *pcreds = rcu_access_pointer(task->real_cred);
dec_rlimit_ucounts(pcreds->ucounts, UCOUNT_RLIMIT_NPROC, 1);
David
Powered by blists - more mailing lists