Re: [PATCH] cgroup: Use READ_ONCE() for task->flags in task_css_set_check()

From: Tejun Heo

Date: Wed Jun 24 2026 - 16:33:24 EST


On Tue, Jun 23, 2026 at 10:29:46AM +0800, Guopeng Zhang wrote:
> - ((task)->flags & PF_EXITING) || (__c))
> + (READ_ONCE((task)->flags) & PF_EXITING) || (__c))

This only feeds the CONFIG_PROVE_RCU lockdep predicate, so it's a
diagnostic-only read. tools/memory-model/Documentation/access-marking.txt
recommends data_race() over READ_ONCE() for those:

(data_race((task)->flags) & PF_EXITING) || (__c))

Please update the changelog to match.

Thanks.