linux-stable/drivers/staging
Gao Xiang eab8018fd2 staging: erofs: fix race when the managed cache is enabled
commit 51232df5e4 upstream.

When the managed cache is enabled, the last reference count
of a workgroup must be used for its workstation.

Otherwise, it could lead to incorrect (un)freezes in
the reclaim path, and it would be harmful.

A typical race as follows:

Thread 1 (In the reclaim path)  Thread 2
workgroup_freeze(grp, 1)                                refcnt = 1
...
workgroup_unfreeze(grp, 1)                              refcnt = 1
                                workgroup_get(grp)      refcnt = 2 (x)
workgroup_put(grp)                                      refcnt = 1 (x)
                                ...unexpected behaviors

* grp is detached but still used, which violates cache-managed
  freeze constraint.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19 13:12:42 +01:00
..
android staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held. 2019-03-10 07:17:16 +01:00
axis-fifo
board
clocking-wizard
comedi staging: comedi: ni_660x: fix missing break in switch statement 2019-03-10 07:17:16 +01:00
dgnc
emxx_udc
erofs staging: erofs: fix race when the managed cache is enabled 2019-03-19 13:12:42 +01:00
fbtft staging/fbtft: Update TODO and mailing lists 2018-09-10 10:39:19 +02:00
fsl-dpaa2 dpaa2-ptp: defer probe when portal allocation failed 2019-02-12 19:46:59 +01:00
fwserial
gasket staging: gasket: TODO: re-implement using UIO 2018-09-10 18:08:06 +02:00
gdm724x
goldfish
greybus
gs_fpgaboot
iio staging: iio: ad7780: update voltage on read 2019-02-12 19:47:00 +01:00
ks7010
media media: staging/media/mt9t031/Kconfig: remove bogus entry 2018-09-12 06:44:01 -04:00
most staging: most: use format specifier "%s" in snprintf 2018-12-05 19:32:12 +01:00
mt29f_spinand
mt7621-dma staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc' 2018-12-05 19:32:12 +01:00
mt7621-dts staging: mt7621-dts: add pcie controller port registers 2018-08-08 14:08:41 +02:00
mt7621-eth
mt7621-mmc
mt7621-pci staging: mt7621-pci: remove remaining pci_legacy dependant code 2018-08-08 14:08:41 +02:00
mt7621-pinctrl staging: mt7621-pinctrl: fix uninitialized variable ngroups 2018-12-05 19:32:12 +01:00
mt7621-spi
netlogic
nvec
octeon
octeon-usb
olpc_dcon staging: olpc_dcon: add a missing dependency 2018-12-19 19:19:49 +01:00
pi433 staging: pi433: fix potential null dereference 2019-02-12 19:47:02 +01:00
rtl8188eu staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1 2019-01-31 08:14:36 +01:00
rtl8192e
rtl8192u staging:rtl8192u: Remove unused macro definitions - Style 2018-08-08 14:27:03 +02:00
rtl8712 staging: rtl8712: Fix possible buffer overrun 2018-12-13 09:16:20 +01:00
rtl8723bs staging: rtl8723bs: Fix build error with Clang when inlining is disabled 2019-03-05 17:58:49 +01:00
rtlwifi Staging/IIO patches for 4.19-rc1 2018-08-18 11:00:00 -07:00
rts5208
sm750fb
speakup staging: speakup: fix tty-operation NULL derefs 2019-02-12 19:47:25 +01:00
unisys
vboxvideo staging: vboxvideo: Change address of scanout buffer on page-flip 2018-09-11 18:39:54 +02:00
vc04_services staging: vchiq_arm: fix compat VCHIQ_IOC_AWAIT_COMPLETION 2018-12-05 19:32:12 +01:00
vme
vt6655
vt6656
wilc1000 staging: wilc1000: fix to set correct value for 'vif_num' 2019-03-10 07:17:16 +01:00
wlan-ng staging: wlan-ng: remove unused definitions from p80211types.h 2018-08-05 16:12:42 +02:00
xgifb
Kconfig ARM: SoC driver updates 2018-08-23 13:52:46 -07:00
Makefile ARM: SoC driver updates 2018-08-23 13:52:46 -07:00