aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Paasch <christoph.paasch@uclouvain.be>2013-10-23 15:49:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-23 16:15:01 -0400
commit35b87f6c135b7ded8ab1a44e46d792f7688f3608 (patch)
tree090adfa9dbe37c9cd8b825c647d7a1a1f916c12a
parent47d4ab91e4472723f181075c81627374ca86816c (diff)
net: Dereference pointer-value of sk_prot->memory_pressure
2e685cad57 (tcp_memcontrol: Kill struct tcp_memcontrol) falsly modified the access to memory_pressure of sk->sk_prot->memory_pressure. The patch did modify the memory_pressure-field of struct cg_proto, but not the one of struct proto. So, the access to sk_prot->memory_pressure should not be changed. Acked-by: Eric Dumazet <edumazet@google.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index c93542f92420..e3a18ff0c38b 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1137,7 +1137,7 @@ static inline bool sk_under_memory_pressure(const struct sock *sk)
1137 if (mem_cgroup_sockets_enabled && sk->sk_cgrp) 1137 if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
1138 return !!sk->sk_cgrp->memory_pressure; 1138 return !!sk->sk_cgrp->memory_pressure;
1139 1139
1140 return !!sk->sk_prot->memory_pressure; 1140 return !!*sk->sk_prot->memory_pressure;
1141} 1141}
1142 1142
1143static inline void sk_leave_memory_pressure(struct sock *sk) 1143static inline void sk_leave_memory_pressure(struct sock *sk)