aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorEric Biggers <[email protected]>2018-02-06 23:42:08 +0000
committerLinus Torvalds <[email protected]>2018-02-07 02:32:48 +0000
commitf7340761812fc10313e6fcc115e0bc4f7a799112 (patch)
tree2374b679e8378f22800e233b0c69883546616138 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentpipe: simplify round_pipe_size() (diff)
downloadkernel-f7340761812fc10313e6fcc115e0bc4f7a799112.tar.gz
kernel-f7340761812fc10313e6fcc115e0bc4f7a799112.zip
pipe: read buffer limits atomically
The pipe buffer limits are accessed without any locking, and may be changed at any time by the sysctl handlers. In theory this could cause problems for expressions like the following: pipe_user_pages_hard && user_bufs > pipe_user_pages_hard ... since the assembly code might reference the 'pipe_user_pages_hard' memory location multiple times, and if the admin removes the limit by setting it to 0, there is a very brief window where processes could incorrectly observe the limit to be exceeded. Fix this by loading the limits with READ_ONCE() prior to use. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]> Acked-by: Kees Cook <[email protected]> Acked-by: Joe Lawrence <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: Willy Tarreau <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: "Luis R . Rodriguez" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions