lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 01/34] cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug
Hello.

In my opinion there are two approaches:
a) drop this backport (given other races present),
b) swap the locks compatible with v4.19 as this patch proposes.

On Mon, Mar 14, 2022 at 05:11:50PM +0800, Zhang Qiao <zhangqiao22@huawei.com> wrote:
> + /*
> + * It should hold cpus lock because a cpu offline event can
> + * cause set_cpus_allowed_ptr() failed.
> + */
> + cpus_read_lock();

Maybe just a nit, the old kernels before commit c5c63b9a6a2e ("cgroup:
Replace deprecated CPU-hotplug functions.") v5.15-rc1~159^2~5
would be more consistent with get_online_cpus() here (but they're
equivalent functionally so the locking order is correct).

Michal

\
 
 \ /
  Last update: 2022-03-14 12:21    [W:0.115 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site