linux-stable/drivers/staging
Gao Xiang 15f12d6bfd erofs: ensure that the post-EOF tails are all zeroed
commit e4c1cf523d upstream.

This was accidentally fixed up in commit e4c1cf523d but we can't
take the full change due to other dependancy issues, so here is just
the actual bugfix that is needed.

[Background]

keltargw reported an issue [1] that with mmaped I/Os, sometimes the
tail of the last page (after file ends) is not filled with zeroes.

The root cause is that such tail page could be wrongly selected for
inplace I/Os so the zeroed part will then be filled with compressed
data instead of zeroes.

A simple fix is to avoid doing inplace I/Os for such tail parts,
actually that was already fixed upstream in commit e4c1cf523d
("erofs: tidy up z_erofs_do_read_page()") by accident.

[1] https://lore.kernel.org/r/3ad8b469-25db-a297-21f9-75db2d6ad224@linux.alibaba.com

Reported-by: keltargw <keltar.gw@gmail.com>
Fixes: 3883a79abd ("staging: erofs: introduce VLE decompression support")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:47:56 +02:00
..
android staging: ion: Prevent incorrect reference counting behavour 2022-04-27 13:39:45 +02:00
axis-fifo
board
clocking-wizard
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-01-24 07:11:50 +01:00
dgnc
emxx_udc
erofs erofs: ensure that the post-EOF tails are all zeroed 2023-09-23 10:47:56 +02:00
fbtft staging: fbtft: fb_st7789v: reset display before initialization 2022-03-28 08:41:42 +02:00
fsl-dpaa2
fwserial
gasket
gdm724x staging: gdm724x: fix use after free in gdm_lte_rx() 2022-03-16 13:20:27 +01:00
goldfish
greybus staging: greybus: codecs: fix type confusion of list iterator variable 2022-06-14 16:59:31 +02:00
gs_fpgaboot
iio staging: iio: resolver: ads1210: fix config mode 2023-05-17 11:13:06 +02:00
ks7010 staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext() 2023-08-11 11:45:34 +02:00
media
most
mt29f_spinand
mt7621-dma
mt7621-dts
mt7621-eth
mt7621-pci
mt7621-pinctrl pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-29 17:10:31 +02:00
mt7621-spi Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()" 2023-03-17 08:31:43 +01:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
rtl8188eu
rtl8192e Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 10:57:15 +02:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2023-01-18 11:30:28 +01:00
rtl8712 staging: rtl8712: fix use after free bugs 2022-09-15 12:17:03 +02:00
rtl8723bs staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan() 2022-06-06 08:24:20 +02:00
rtlwifi
rts5208 staging: rts5208: Fix get_ms_information() heap buffer size 2021-09-22 11:48:07 +02:00
sm750fb
speakup speakup: fix a segfault caused by switching consoles 2022-11-25 17:40:26 +01:00
unisys
vboxvideo
vc04_services
vme
vt6655 staging: vt6655: fix potential memory leak 2022-10-26 13:19:40 +02:00
vt6656
wilc1000 wifi: wilc1000: sdio: fix module autoloading 2023-01-18 11:30:52 +01:00
wlan-ng staging: wlan-ng: Avoid bitwise vs logical OR warning in hfa384x_usb_throttlefn() 2022-01-27 09:04:13 +01:00
xgifb
Kconfig
Makefile