]> git.baikalelectronics.ru Git - kernel.git/commit
ip: Fix a data-race around sysctl_fwmark_reflect.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:57 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:11 +0000 (17:14 +0200)
commiteca4b109445c09fd0760cb11f9123918e4e48ee3
tree1f16d46d76fa442d70d6aaad7f04fc2cd4726a4f
parentfb94a6c0f1c795c6908f67a144e48caee5321b3d
ip: Fix a data-race around sysctl_fwmark_reflect.

[ Upstream commit e50a7014ef28740cb6176dda6481fbdbf11fcbb7 ]

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

Fixes: df3d62898c38 ("net: add a sysctl to reflect the fwmark on replies")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/ip.h