mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
fuse: use READ_ONCE on congestion_threshold and max_background
[ Upstream commit 2a23f2b8ad
]
Since they are of unsigned int type, it's allowed to read them
unlocked during reporting to userspace. Let's underline this fact
with READ_ONCE() macroses.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9d7681036d
commit
2b149bb378
1 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ static ssize_t fuse_conn_max_background_read(struct file *file,
|
|||
if (!fc)
|
||||
return 0;
|
||||
|
||||
val = fc->max_background;
|
||||
val = READ_ONCE(fc->max_background);
|
||||
fuse_conn_put(fc);
|
||||
|
||||
return fuse_conn_limit_read(file, buf, len, ppos, val);
|
||||
|
@ -144,7 +144,7 @@ static ssize_t fuse_conn_congestion_threshold_read(struct file *file,
|
|||
if (!fc)
|
||||
return 0;
|
||||
|
||||
val = fc->congestion_threshold;
|
||||
val = READ_ONCE(fc->congestion_threshold);
|
||||
fuse_conn_put(fc);
|
||||
|
||||
return fuse_conn_limit_read(file, buf, len, ppos, val);
|
||||
|
|
Loading…
Reference in a new issue