From: David S. Miller Date: Fri, 8 Jul 2022 11:10:34 +0000 (+0100) Subject: Merge branch 'sysctl-data-races' X-Git-Tag: baikal/mips/sdk6.1~5324^2~27 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=2fb162f0c1d856489751d53da258d2a89550b7a7;p=kernel.git Merge branch 'sysctl-data-races' Kuniyuki Iwashima says: ==================== sysctl: Fix data-races around ipv4_table. A sysctl variable is accessed concurrently, and there is always a chance of data-race. So, all readers and writers need some basic protection to avoid load/store-tearing. The first half of this series changes some proc handlers used in ipv4_table to use READ_ONCE() and WRITE_ONCE() internally to fix data-races on the sysctl side. Then, the second half adds READ_ONCE() to the other readers of ipv4_table. Changes: v2: * Drop some changes that makes backporting difficult * First cleanup patch * Lockless helpers and .proc_handler changes * Drop the tracing part for .sysctl_mem * Steve already posted a fix * Drop int-to-bool change for cipso * Should be posted to net-next later * Drop proc_dobool() change * Can be included in another series v1: https://lore.kernel.org/netdev/20220706052130.16368-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller --- 2fb162f0c1d856489751d53da258d2a89550b7a7