]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix a data-race around netdev_unregister_timeout_secs.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:59 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:58 +0000 (13:46 +0100)
commit8e1b8709d30ab6359ff01b2b709dbaea282b075f
tree4154ecd1f5a73cfcac4b6241bb0d20f4f302a067
parent6fa410e2e10fb9f86d0e8c50ff802e0a6fd4b8cd
net: Fix a data-race around netdev_unregister_timeout_secs.

While reading netdev_unregister_timeout_secs, it can be changed
concurrently.  Thus, we need to add READ_ONCE() to its reader.

Fixes: 2f76cf6ad290 ("net: make unregister netdev warning timeout configurable")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c