net: convert packet_fanout.sk_ref 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>
Change-Id: Ibcded37762b5421cb3b81ca19b1f13a101ac3958
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: fb5c2c17a556d9b00798d6a6b9e624281ee2eb28
[dcagle@codeaurora.org: Change one more atomic ref to refcount]
Signed-off-by: Dennis Cagle <dcagle@codeaurora.org>
2 files changed