]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: annotate lockless access to tcp_memory_pressure
authorEric Dumazet <edumazet@google.com>
Wed, 9 Oct 2019 22:10:15 +0000 (15:10 -0700)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 Oct 2019 04:35:00 +0000 (21:35 -0700)
commit439f5a78f2a8d9765e6830cd1f2794b0ab7272c6
treeb64b0a41ac143b7a2eefa20d06eab67a5c4f16da
parent69b145a1d6dc5c94b24ab34e470a6b36c39cb587
tcp: annotate lockless access to tcp_memory_pressure

tcp_memory_pressure is read without holding any lock,
and its value could be changed on other cpus.

Use READ_ONCE() to annotate these lockless reads.

The write side is already using atomic ops.

Fixes: 35cf0364cba9 ("tcp: introduce tcp_under_memory_pressure()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
include/net/tcp.h
net/ipv4/tcp.c