net: convert sk_filter.refcnt from atomic_t to refcount_t
authorReshetova, Elena <elena.reshetova@intel.com>
Tue, 21 Mar 2017 11:59:19 +0000 (13:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 19:06:08 +0000 (12:06 -0700)
commit4c355cdfbba537971b5c3849680b1b6453a7a383
tree0992566cf726ff06986c271a2f7aff0c911d9441
parent726bceca81ba09956226ea03c9fb58e037c3db7d
net: convert sk_filter.refcnt 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>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/filter.h
net/core/filter.c