]> git.baikalelectronics.ru Git - kernel.git/commit
net: convert (struct ubuf_info)->refcnt to refcount_t
authorEric Dumazet <edumazet@google.com>
Thu, 31 Aug 2017 23:48:22 +0000 (16:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Sep 2017 03:22:03 +0000 (20:22 -0700)
commitb316ac560e6cfe594a061e1e7afd287b7fb1a053
tree14ee9ec0f2e759bb237b2a010aa56989874cc054
parent11a38f2b452a62accc6be2e2c087a2fd3ce457c6
net: convert (struct ubuf_info)->refcnt 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.

v2: added the change in drivers/vhost/net.c as spotted
by Willem.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c
include/linux/skbuff.h
net/core/skbuff.c