diff options
| author | Dmitry Vyukov <[email protected]> | 2015-09-17 15:17:08 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-10-04 18:03:40 +0000 |
| commit | 7098296a362a96051fa120abf48f0095818b99cd (patch) | |
| tree | d5faab1ed808c7fc3d55be88d431452b43e1e63e /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c (diff) | |
| download | kernel-7098296a362a96051fa120abf48f0095818b99cd.tar.gz kernel-7098296a362a96051fa120abf48f0095818b99cd.zip | |
tty: fix data race in flush_to_ldisc
flush_to_ldisc reads port->itty and checks that it is not NULL,
concurrently release_tty sets port->itty to NULL. It is possible
that flush_to_ldisc loads port->itty once, ensures that it is
not NULL, but then reloads it again and uses. The second load
can already return NULL, which will cause a crash.
Use READ_ONCE to read port->itty.
The data race was found with KernelThreadSanitizer (KTSAN).
Signed-off-by: Dmitry Vyukov <[email protected]>
Reviewed-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
