diff options
| author | Nadav Amit <[email protected]> | 2021-08-08 00:13:42 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2021-08-09 03:21:11 +0000 |
| commit | 20c0b380f971e7d48f5d978bc27d827f7eabb21a (patch) | |
| tree | 502ab1f31055a72f8c56dc43190978fcb1d7915b /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | io_uring: clear TIF_NOTIFY_SIGNAL when running task work (diff) | |
| download | kernel-20c0b380f971e7d48f5d978bc27d827f7eabb21a.tar.gz kernel-20c0b380f971e7d48f5d978bc27d827f7eabb21a.zip | |
io_uring: Use WRITE_ONCE() when writing to sq_flags
The compiler should be forbidden from any strange optimization for async
writes to user visible data-structures. Without proper protection, the
compiler can cause write-tearing or invent writes that would confuse the
userspace.
However, there are writes to sq_flags which are not protected by
WRITE_ONCE(). Use WRITE_ONCE() for these writes.
This is purely a theoretical issue. Presumably, any compiler is very
unlikely to do such optimizations.
Fixes: 75b28affdd6a ("io_uring: allocate the two rings together")
Cc: Jens Axboe <[email protected]>
Cc: Pavel Begunkov <[email protected]>
Signed-off-by: Nadav Amit <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions
