summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorLi Wang <liwang@kylinos.cn>2026-05-22 16:38:05 +0800
committerMiklos Szeredi <mszeredi@redhat.com>2026-06-15 14:06:19 +0200
commit521fed4886ccb3b78846595e843ec9419d343623 (patch)
tree3758410c7edc54df77ba28e2c7f3ad31dca5094f /drivers/phy/eswin/git@git.tavy.me:linux.git
parenta9489fbda747ca8eb183161f887f5295df3564fe (diff)
fuse: use READ_ONCE in fuse_chan_num_background()
fuse_chan_num_background() is called without holding fch->bg_lock (for example from fuse_writepages() to compare against fc->congestion_threshold), while fch->num_background is updated under bg_lock in dev.c and dev_uring.c. This is the same locked-write/lockless-read pattern already used for max_background in fuse_chan_max_background(). Use READ_ONCE() on the read side so that: - The compiler does not cache or coalesce loads of a value that may change concurrently on another CPU. - Prevent KCSAN from reporting an unexpected race. Signed-off-by: Li Wang <liwang@kylinos.cn> Fixes: 670d21c6e17f ("fuse: remove reliance on bdi congestion") Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions