linux-uconsole/drivers/staging
Gao Xiang b56d00ace1 erofs: zero out when listxattr is called with no xattr
commit 926d165017 upstream.

As David reported [1], ENODATA returns when attempting
to modify files by using EROFS as an overlayfs lower layer.

The root cause is that listxattr could return unexpected
-ENODATA by mistake for inodes without xattr. That breaks
listxattr return value convention and it can cause copy
up failure when used with overlayfs.

Resolve by zeroing out if no xattr is found for listxattr.

[1] https://lore.kernel.org/r/CAEvUa7nxnby+rxK-KRMA46=exeOMApkDMAV08AjMkkPnTPV4CQ@mail.gmail.com
Link: https://lore.kernel.org/r/20191201084040.29275-1-hsiangkao@aol.com
Fixes: cadf1ccf1b ("staging: erofs: add error handling for xattr submodule")
Cc: <stable@vger.kernel.org> # 4.19+
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-12-17 20:35:00 +01:00
..
android staging: android: ion: Bail out upon SIGKILL when allocating memory. 2019-08-16 10:12:38 +02:00
axis-fifo staging: axis-fifo: add CONFIG_OF dependency 2019-05-04 09:20:12 +02:00
board
clocking-wizard
comedi staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error 2019-12-01 09:17:45 +01:00
dgnc
emxx_udc
erofs erofs: zero out when listxattr is called with no xattr 2019-12-17 20:35:00 +01:00
fbtft Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc 2019-10-17 13:45:10 -07:00
fsl-dpaa2 staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work 2019-07-14 08:11:22 +02:00
fwserial
gasket staging: gasket: apex: fix copy-paste typo 2019-08-16 10:12:37 +02:00
gdm724x
goldfish
greybus staging: greybus: power_supply: fix prop-descriptor request size 2019-05-10 17:54:04 +02:00
gs_fpgaboot
iio Staging: iio: adt7316: Fix i2c data reading, set the data field 2019-12-13 08:51:26 +01:00
ks7010
media media: imx: work around false-positive warning, again 2019-11-20 18:47:16 +01:00
most staging: most: cdev: fix chrdev_region leak in mod_exit 2019-05-10 17:54:05 +02:00
mt29f_spinand
mt7621-dma
mt7621-dts
mt7621-eth
mt7621-mmc
mt7621-pci staging, mt7621-pci: fix build without pci support 2019-05-04 09:20:12 +02:00
mt7621-pinctrl staging: mt7621-pinctrl: use pinconf-generic for 'dt_node_to_map' and 'dt_free_map' 2019-11-06 13:05:27 +01:00
mt7621-spi staging: spi: mt7621: Add return code check on device_reset() 2019-04-05 22:33:11 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
rtl8188eu staging: rtl8188eu: fix interface sanity check 2019-12-17 20:34:31 +01:00
rtl8192e staging: rtl8192e: fix potential use after free 2019-12-05 09:21:26 +01:00
rtl8192u
rtl8712 staging: rtl8712: fix interface sanity check 2019-12-17 20:34:31 +01:00
rtl8723bs staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids 2019-12-05 09:21:26 +01:00
rtlwifi staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc 2019-05-04 09:20:17 +02:00
rts5208
sm750fb
speakup
unisys
vboxvideo
vc04_services staging: bcm2835-camera: Handle empty EOS buffers whilst streaming 2019-07-14 08:11:22 +02:00
vme
vt6655 staging: vt6655: Fix memory leak in vt6655_probe 2019-10-17 13:45:11 -07:00
vt6656 staging: vt6656: use meaningful error code during buffer allocation 2019-07-31 07:26:57 +02:00
wilc1000 staging: wilc1000: fix error path cleanup in wilc_wlan_initialize() 2019-09-16 08:22:17 +02:00
wlan-ng staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS 2019-10-29 09:19:48 +01:00
xgifb
Kconfig
Makefile