amt: use READ_ONCE() in amt module
authorTaehee Yoo <ap420073@gmail.com>
Sun, 17 Jul 2022 16:09:05 +0000 (16:09 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 Jul 2022 10:37:02 +0000 (12:37 +0200)
commit928f353cb8672f0d6078aad75eeec0ed33875b12
tree737f628a1b97aa91a61be68c10865d9b454ca384
parent9c343ea6185febe5f6b74f7f7b3757f3dd9c5af6
amt: use READ_ONCE() in amt module

There are some data races in the amt module.
amt->ready4, amt->ready6, and amt->status can be accessed concurrently
without locks.
So, it uses READ_ONCE() and WRITE_ONCE().

Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/amt.c