linux_dsm_epyc7002/drivers/net
Elena Reshetova e187246f0f drivers, net: convert masces_rx_sa.refcnt from atomic_t to refcount_t
atomic_t variables are currently used to implement reference
counters with the following properties:
 - counter is initialized to 1 using atomic_set()
 - a resource is freed upon counter reaching zero
 - once counter reaches zero, its further
   increments aren't allowed
 - counter schema uses basic atomic operations
   (set, inc, inc_not_zero, dec_and_test, etc.)

Such atomic variables should be converted to a newly provided
refcount_t type and API that prevents accidental counter overflows
and underflows. This is important since overflows and underflows
can lead to use-after-free situation and be exploitable.

The variable masces_rx_sa.refcnt is used as pure reference counter.
Convert it to refcount_t and fix up the operations.

Suggested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Windsor <dwindsor@gmail.com>
Reviewed-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-22 02:22:39 +01:00
..
appletalk drivers/net/appletalk: Convert timers to use timer_setup() 2017-10-18 12:39:55 +01:00
arcnet
bonding
caif
can
cris
dsa net: dsa: add dsa_to_port helper 2017-10-18 12:24:33 +01:00
ethernet drivers, net, mlx5: convert fs_node.refcount from atomic_t to refcount_t 2017-10-22 02:22:39 +01:00
fddi
fjes
hamradio drivers, net, hamradio: convert sixpack.refcnt from atomic_t to refcount_t 2017-10-22 02:22:39 +01:00
hippi
hyperv hv_netvsc: Add initialization of tx_table in netvsc_device_add() 2017-10-14 18:42:55 -07:00
ieee802154 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2017-10-21 02:22:19 +01:00
ipvlan net: Add extack to validator_info structs used for address notifier 2017-10-20 13:15:07 +01:00
phy net: phy: broadcom: support new device flag for setting master mode 2017-10-12 22:59:38 -07:00
plip
ppp
slip
team
usb net: usb: Convert timers to use timer_setup() 2017-10-18 12:40:26 +01:00
vmxnet3
wan hdlc: Convert timers to use timer_setup() 2017-10-18 12:39:55 +01:00
wimax
wireless wireless-drivers-next patches for 4.15 2017-10-20 08:37:28 +01:00
xen-netback net/xen-netback: Convert timers to use timer_setup() 2017-10-18 12:40:27 +01:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c drivers, net: convert masces_rx_sa.refcnt from atomic_t to refcount_t 2017-10-22 02:22:39 +01:00
macvlan.c macvlan/macvtap: Add support for L2 forwarding offloads with macvtap 2017-10-19 12:43:59 +01:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c thunderbolt: Right shifting to zero bug in tbnet_handle_packet() 2017-10-19 13:04:32 +01:00
tun.c net-tun: fix panics at dismantle time 2017-10-20 13:31:26 +01:00
veth.c
virtio_net.
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c