netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
authorJason Xing <kernelxing@tencent.com>
Mon, 4 Mar 2024 08:20:43 +0000 (16:20 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 7 Mar 2024 09:36:58 +0000 (10:36 +0100)
commitf99b494b40431f0ca416859f2345746199398e2b
tree4b060253eb161d8503d4d16111253fcebe6dc8c8
parenta2e706841488f474c06e9b33f71afc947fb3bf56
netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/netrom/af_netrom.c