Skip to content

x86/intel_rdt: task_work vs task_struct rmid/closid write race

Valentin Schneider lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

--------
Empty git diff between the two, but:

o Collected Reviewed-by
o Reworded changelogs (James)
o Split READ_ONCE/WRITE_ONCE changes into separate patch (James) (@James: note that I had the audacity to slap your RB to that new patch, given that you already reviewed the diff. Hopefully you won't hate the CL too much!)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/intel_rdt: Check monitor group vs control group membership earlierarch/x86/kernel/cpu/resctrl/rdtgroup.c+13 -80 replies
2/3x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update racearch/x86/kernel/cpu/resctrl/rdtgroup.c+21 -130 replies
3/3x86/intel_rdt: Apply READ_ONCE/WRITE_ONCE to task_struct .rmid & .closidarch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/rdtgroup.c+20 -150 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJames Morse
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] x86/intel_rdt: task_work vs task_struct rmid/closid write race

Hi folks,

This is a small cleanup + a fix for a race I stumbled upon while staring at resctrl stuff.

Briefly tested on a Xeon Gold 5120 (m2.xlarge.x86 on Equinix) by bouncing a few tasks around control groups.

Revisions
=========

v1 -> v2
--------
Empty git diff between the two, but:

o Collected Reviewed-by
o Reworded changelogs (James)
o Split READ_ONCE/WRITE_ONCE changes into separate patch (James) (@James: note that I had the audacity to slap your RB to that new patch, given that you already reviewed the diff. Hopefully you won't hate the CL too much!)

Cheers,
Valentin

Valentin Schneider (3):
x86/intel_rdt: Check monitor group vs control group membership earlier x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update race x86/intel_rdt: Apply READ_ONCE/WRITE_ONCE to task_struct .rmid &
.closid

 arch/x86/include/asm/resctrl.h         | 11 ++--
 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 71 ++++++++++++++++----------
 2 files changed, 50 insertions(+), 32 deletions(-)

--
2.27.0