net: convert sk_buff.users from atomic_t to refcount_t
authorReshetova, Elena <elena.reshetova@intel.com>
Fri, 30 Jun 2017 10:07:58 +0000 (13:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Jul 2017 14:39:07 +0000 (07:39 -0700)
commit633547973ffc32fd2c815639d4675e1531f0896f
tree751ca7a379366af93f578d9f35f48339d4d2dd9b
parent53869cebce4bc53f71a080e7830600d4ae1ab712
net: convert sk_buff.users 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>
21 files changed:
drivers/infiniband/hw/nes/nes_cm.c
drivers/isdn/mISDN/socket.c
drivers/net/rionet.c
drivers/s390/net/ctcm_main.c
drivers/s390/net/netiucv.c
drivers/s390/net/qeth_core_main.c
include/linux/skbuff.h
net/core/datagram.c
net/core/dev.c
net/core/netpoll.c
net/core/pktgen.c
net/core/rtnetlink.c
net/core/skbuff.c
net/dccp/ipv6.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c
net/key/af_key.c
net/netlink/af_netlink.c
net/rxrpc/skbuff.c
net/sctp/outqueue.c
net/sctp/socket.c