linux_dsm_epyc7002/drivers
Elena Reshetova eaf6ab7643 drivers, net, ethernet: convert clip_entry.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 clip_entry.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:38 +01:00
..
accessibility
acpi
amba
android
ata
atm atm: idt77252: Convert timers to use timer_setup() 2017-10-18 12:39:38 +01:00
auxdisplay
base
bcma bcma: use bcma_debug and pr_cont in MIPS driver 2017-10-17 17:22:07 +03:00
block
bluetooth Bluetooth: mark expected switch fall-throughs 2017-10-14 09:25:51 +02:00
bus
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gpio
gpu
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
ide
idle
iio
infiniband qed: Fix iWARP out of order flow 2017-10-19 12:46:43 +01:00
input
iommu
ipack
irqchip
isdn isdnloop: Convert timers to use timer_setup() 2017-10-18 12:40:25 +01:00
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd
mux
net drivers, net, ethernet: convert clip_entry.refcnt from atomic_t to refcount_t 2017-10-22 02:22:38 +01:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci
pcmcia pcmcia/electra_cf: Convert timers to use timer_setup() 2017-10-18 12:39:37 +01:00
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390/qeth: don't dump control cmd twice 2017-10-20 13:11:05 +01:00
sbus
scsi qed: Fix iWARP out of order flow 2017-10-19 12:46:43 +01:00
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt thunderbolt: Fix a couple right shifting to zero bugs 2017-10-19 13:04:32 +01:00
tty
uio
usb
uwb
vfio
vhost vhost_net: do not stall on zerocopy depletion 2017-10-09 20:46:39 -07:00
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile