linux-stable/net/smc
Eric Dumazet 9257a1d6f2 net: annotate data-races around sk->sk_lingertime
[ Upstream commit bc1fb82ae1 ]

sk_getsockopt() runs locklessly. This means sk->sk_lingertime
can be read while other threads are changing its value.

Other reads also happen without socket lock being held,
and must be annotated.

Remove preprocessor logic using BITS_PER_LONG, compilers
are smart enough to figure this by themselves.

v2: fixed a clang W=1 (-Wtautological-constant-out-of-range-compare) warning
    (Jakub)

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:33 +02:00
..
af_smc.c net: annotate data-races around sk->sk_lingertime 2023-09-13 09:42:33 +02:00
Kconfig
Makefile net/smc: fix compile warning for smc_sysctl 2022-03-07 11:59:17 +00:00
smc.h net/smc: Fix setsockopt and sysctl to specify same buffer size again 2023-08-23 17:52:18 +02:00
smc_cdc.c net/smc: fix NULL sndbuf_desc in smc_cdc_tx_handler() 2023-03-22 13:33:45 +01:00
smc_cdc.h net/smc: fix kernel panic caused by race of smc_sock 2021-12-28 12:42:45 +00:00
smc_clc.c net/smc: Fix setsockopt and sysctl to specify same buffer size again 2023-08-23 17:52:18 +02:00
smc_clc.h net/smc: Allow virtually contiguous sndbufs or RMBs for SMC-R 2022-07-18 11:19:17 +01:00
smc_close.c net: deal with most data-races in sk_wait_event() 2023-05-24 17:32:32 +01:00
smc_close.h
smc_core.c net/smc: Fix setsockopt and sysctl to specify same buffer size again 2023-08-23 17:52:18 +02:00
smc_core.h net/smc: replace mutex rmbs_lock and sndbufs_lock with rw_semaphore 2023-08-23 17:52:18 +02:00
smc_diag.c net/smc: Enable module load on netlink usage 2022-07-27 13:24:42 +01:00
smc_ib.c net/smc: Allow virtually contiguous sndbufs or RMBs for SMC-R 2022-07-18 11:19:17 +01:00
smc_ib.h net/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu 2022-07-18 11:19:17 +01:00
smc_ism.c net/smc: Pass on DMBE bit mask in IRQ handler 2022-07-27 13:24:42 +01:00
smc_ism.h net/smc: Eliminate struct smc_ism_position 2022-07-27 13:24:42 +01:00
smc_llc.c net/smc: replace mutex rmbs_lock and sndbufs_lock with rw_semaphore 2023-08-23 17:52:18 +02:00
smc_llc.h net/smc: Introduce a specific sysctl for TEST_LINK time 2022-09-22 12:58:21 +02:00
smc_netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
smc_netlink.h net/smc: add support for user defined EIDs 2021-09-14 12:49:10 +01:00
smc_netns.h
smc_pnet.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
smc_pnet.h net/smc: Use a mutex for locking "struct smc_pnettable" 2022-02-24 09:09:33 -08:00
smc_rx.c net: deal with most data-races in sk_wait_event() 2023-05-24 17:32:32 +01:00
smc_rx.h
smc_stats.c net/smc: Fix ENODATA tests in smc_nl_get_fback_stats() 2021-06-21 12:16:58 -07:00
smc_stats.h net/smc: Make SMC statistics network namespace aware 2021-06-16 12:54:02 -07:00
smc_sysctl.c net/smc: Fix setsockopt and sysctl to specify same buffer size again 2023-08-23 17:52:18 +02:00
smc_sysctl.h net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set 2022-03-09 20:02:35 -08:00
smc_tracepoint.c net/smc: Introduce tracepoint for smcr link down 2021-11-01 13:39:14 +00:00
smc_tracepoint.h net/smc: Add net namespace for tracepoints 2022-01-02 12:07:39 +00:00
smc_tx.c net: deal with most data-races in sk_wait_event() 2023-05-24 17:32:32 +01:00
smc_tx.h net/smc: Cork when sendpage with MSG_SENDPAGE_NOTLAST flag 2022-01-31 15:08:20 +00:00
smc_wr.c net/smc: Fix possible access to freed memory in link clear 2022-09-07 16:00:48 +01:00
smc_wr.h net/smc: Fix possible access to freed memory in link clear 2022-09-07 16:00:48 +01:00