diff options
author | Valentin Schneider <valentin.schneider@arm.com> | 2020-04-16 00:05:05 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-04-30 21:14:39 +0300 |
commit | 9818427c6270a9ce8c52c8621026fe9cebae0f92 (patch) | |
tree | 8fc738fb34d0ccc019f224a589555499a387a857 /kernel/sched/topology.c | |
parent | 45da27732b0b9b7a04696653065d5e6037bc5ac0 (diff) | |
download | linux-9818427c6270a9ce8c52c8621026fe9cebae0f92.tar.xz |
sched/debug: Make sd->flags sysctl read-only
Writing to the sysctl of a sched_domain->flags directly updates the value of
the field, and goes nowhere near update_top_cache_domain(). This means that
the cached domain pointers can end up containing stale data (e.g. the
domain pointed to doesn't have the relevant flag set anymore).
Explicit domain walks that check for flags will be affected by
the write, but this won't be in sync with the cached pointers which will
still point to the domains that were cached at the last sched_domain
build.
In other words, writing to this interface is playing a dangerous game. It
could be made to trigger an update of the cached sched_domain pointers when
written to, but this does not seem to be worth the trouble. Make it
read-only.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200415210512.805-3-valentin.schneider@arm.com
Diffstat (limited to 'kernel/sched/topology.c')
0 files changed, 0 insertions, 0 deletions