net: convert sock.sk_wmem_alloc from atomic_t to refcount_t
authorReshetova, Elena <elena.reshetova@intel.com>
Fri, 30 Jun 2017 10:08:00 +0000 (13:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Jul 2017 14:39:08 +0000 (07:39 -0700)
commit14afee4b6092fde451ee17604e5f5c89da33e71e
tree19be7a1d72a1b25c5e5366c1213cdda982aacca2
parent2638595afccf6554bfe55268ff9b2d3ac3dff2e6
net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
37 files changed:
drivers/atm/fore200e.c
drivers/atm/he.c
drivers/atm/idt77252.c
include/linux/atmdev.h
include/net/sock.h
net/atm/br2684.c
net/atm/clip.c
net/atm/common.c
net/atm/lec.c
net/atm/mpc.c
net/atm/pppoatm.c
net/atm/raw.c
net/atm/signaling.c
net/caif/caif_socket.c
net/core/datagram.c
net/core/skbuff.c
net/core/sock.c
net/ipv4/af_inet.c
net/ipv4/esp4.c
net/ipv4/ip_output.c
net/ipv4/tcp.c
net/ipv4/tcp_offload.c
net/ipv4/tcp_output.c
net/ipv6/esp6.c
net/ipv6/ip6_output.c
net/kcm/kcmproc.c
net/key/af_key.c
net/netlink/af_netlink.c
net/packet/af_packet.c
net/phonet/socket.c
net/rds/tcp_send.c
net/rxrpc/af_rxrpc.c
net/sched/sch_atm.c
net/sctp/output.c
net/sctp/proc.c
net/sctp/socket.c
net/unix/af_unix.c