]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sock: annotate data-races around prot->memory_pressure
authorEric Dumazet <edumazet@google.com>
Fri, 18 Aug 2023 01:51:32 +0000 (01:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:23:12 +0000 (16:23 +0200)
commit403cc3e6253d6ffda9eaf7334ced74a17ef95f79
tree331bb06d1e2f473bd29f8c945767fd62fff2f3e2
parent005b6572d039d8ce065be80ef7458bedb1df6bb5
sock: annotate data-races around prot->memory_pressure

[ Upstream commit 76f33296d2e09f63118db78125c95ef56df438e9 ]

*prot->memory_pressure is read/writen locklessly, we need
to add proper annotations.

A recent commit added a new race, it is time to audit all accesses.

Fixes: 2d0c88e84e48 ("sock: Fix misuse of sk_under_memory_pressure()")
Fixes: 4d93df0abd50 ("[SCTP]: Rewrite of sctp buffer management code")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Abel Wu <wuyun.abel@bytedance.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Link: https://lore.kernel.org/r/20230818015132.2699348-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/sock.h
net/sctp/socket.c