WSL2-Linux-Kernel/drivers
Ahmed S. Darwish cd29f22019 dma-buf: Use sequence counter with associated wound/wait mutex
A sequence counter write side critical section must be protected by some
form of locking to serialize writers. If the serialization primitive is
not disabling preemption implicitly, preemption has to be explicitly
disabled before entering the sequence counter write side critical
section.

The dma-buf reservation subsystem uses plain sequence counters to manage
updates to reservations. Writer serialization is accomplished through a
wound/wait mutex.

Acquiring a wound/wait mutex does not disable preemption, so this needs
to be done manually before and after the write side critical section.

Use the newly-added seqcount_ww_mutex_t instead:

  - It associates the ww_mutex with the sequence count, which enables
    lockdep to validate that the write side critical section is properly
    serialized.

  - It removes the need to explicitly add preempt_disable/enable()
    around the write side critical section because the write_begin/end()
    functions for this new data type automatically do this.

If lockdep is disabled this ww_mutex lock association is compiled out
and has neither storage size nor runtime overhead.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://lkml.kernel.org/r/20200720155530.1173732-13-a.darwish@linutronix.de
2020-07-29 16:14:25 +02:00
..
accessibility
acpi Merge branch 'acpi-fan' 2020-07-03 16:15:31 +02:00
amba
android
ata
atm
auxdisplay
base regmap: Fixes for v5.8 2020-07-17 09:58:18 -07:00
bcma
block Char/Misc fixes for 5.8-rc6 2020-07-16 11:26:40 -07:00
bluetooth
bus bus: ti-sysc: Do not disable on suspend for no-idle 2020-07-02 13:57:57 -07:00
cdrom
char Char/Misc fixes for 5.8-rc6 2020-07-16 11:26:40 -07:00
clk A couple build fixes for issues exposed this merge window and a fix for 2020-07-15 19:00:12 -07:00
clocksource arm64: arch_timer: Disable the compat vdso for cores affected by ARM64_WORKAROUND_1418040 2020-07-08 21:57:51 +01:00
connector
counter
cpufreq cpufreq: intel_pstate: Fix active mode setting from command line 2020-07-13 17:55:57 +02:00
cpuidle
crypto
dax
dca
devfreq
dio
dma dmaengine fixes for v5.5-rc6 2020-07-15 15:58:11 -07:00
dma-buf dma-buf: Use sequence counter with associated wound/wait mutex 2020-07-29 16:14:25 +02:00
edac
eisa
extcon
firewire
firmware arm64 fixes for -rc6 2020-07-17 15:27:52 -07:00
fpga
fsi
gnss
gpio
gpu dma-buf: Use sequence counter with associated wound/wait mutex 2020-07-29 16:14:25 +02:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid into master 2020-07-17 09:43:13 -07:00
hsi
hv Drivers: hv: Change flag to write log level in panic msg to false 2020-06-29 10:30:35 +00:00
hwmon hwmon: (drivetemp) Avoid SCT usage on Toshiba DT01ACA family drives 2020-07-18 08:11:44 -07:00
hwspinlock
hwtracing intel_th: Fix a NULL dereference when hub driver is not loaded 2020-07-10 15:12:48 +02:00
i2c i2c: mlxcpld: check correct size of maximum RECV_LEN packet 2020-07-04 08:20:38 +02:00
i3c
ide
idle
iio First set of IIO and counter fixes in the 5.8 cycle. 2020-07-08 09:20:50 +02:00
infiniband RDMA/mlx5: Set PD pointers for the error flow unwind 2020-07-08 20:15:59 -03:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-07-13 18:31:15 -07:00
interconnect
iommu Two fixes for the interrupt subsystem: 2020-07-19 11:53:08 -07:00
ipack
irqchip Bugfixes and a one-liner patch to silence sparse. 2020-07-06 12:48:04 -07:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm: use noio when sending kobject event 2020-07-08 12:50:51 -04:00
media
memory
memstick
message
mfd irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
misc mei: bus: don't clean driver pointer 2020-06-29 19:10:51 +02:00
mmc mmc: sdhci-msm: Override DLL_CONFIG only if the valid value is supplied 2020-07-08 15:30:35 +02:00
most
mtd mtd: rawnand: xway: Fix build issue 2020-07-07 21:04:38 +02:00
mux
net mlxsw: pci: Fix use-after-free in case of failed devlink reload 2020-07-10 14:33:34 -07:00
nfc
ntb
nubus
nvdimm libnvdimm/security: Fix key lookup permissions 2020-07-08 17:08:01 -07:00
nvme nvme: explicitly update mpath disk capacity on revalidation 2020-07-16 16:40:27 +02:00
nvmem
of
opp opp: Increase parsed_static_opps in _of_add_opp_table_v1() 2020-07-16 08:50:54 +05:30
oprofile
parisc
parport
pci irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
pcmcia
perf drivers/perf: Prevent forced unbinding of PMU drivers 2020-07-17 10:51:44 +01:00
phy phy: fixes for 5.8 2020-07-08 18:00:07 +02:00
pinctrl intel-pinctrl for v5.8-2 2020-06-28 01:08:21 +02:00
platform platform/x86: asus-wmi: allow BAT1 battery name 2020-07-15 12:47:04 +03:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 vfio-ccw: Fix a build error due to missing include of linux/slab.h 2020-07-03 11:41:31 +02:00
sbus
scsi scsi: megaraid_sas: Remove undefined ENABLE_IRQ_POLL macro 2020-07-15 16:16:45 -04:00
sfi
sh
siox
slimbus
soc i.MX fixes for 5.8, round 2: 2020-07-16 22:08:07 +02:00
soundwire
spi spi: Fixes for v5.8 2020-07-17 10:24:09 -07:00
spmi
ssb
staging staging: comedi: verify array index is correct before using it 2020-07-10 14:03:00 +02:00
target
tc
tee
thermal - Fix invalid index array access on int340x_thermal leading to a 2020-07-16 11:08:54 -07:00
thunderbolt
tty TTY/Serial driver fixes for 5.8-rc6 2020-07-16 11:10:27 -07:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-03 10:52:02 +02:00
usb USB-serial fixes for 5.8-rc6 2020-07-16 17:30:59 +02:00
vdpa
vfio
vhost
video
virt virt: vbox: Fix guest capabilities mask check 2020-07-10 13:40:19 +02:00
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen: branch for v5.8-rc5 2020-07-11 11:16:46 -07:00
zorro
Kconfig
Makefile