]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/kbuf: use WRITE_ONCE() for userspace-shared buffer ring fields
authorJoanne Koong <joannelkoong@gmail.com>
Thu, 4 Dec 2025 23:54:50 +0000 (15:54 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Dec 2025 16:52:02 +0000 (09:52 -0700)
commita4c694bfc2455e82b7caf6045ca893d123e0ed11
treea2966e39c8205f2c96d24bcf09bce48ae7e1ba62
parent78385c7299f7514697d196b3233a91bd5e485591
io_uring/kbuf: use WRITE_ONCE() for userspace-shared buffer ring fields

buf->addr and buf->len reside in memory shared with userspace. They
should be written with WRITE_ONCE() to guarantee atomic stores and
prevent tearing or other unsafe compiler optimizations.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Cc: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c