linux-stable/fs/erofs
Xin Yin b5cb79dcfd erofs: fix crash when enable tracepoint cachefiles_prep_read
RIP: 0010:trace_event_raw_event_cachefiles_prep_read+0x88/0xe0
[cachefiles]
Call Trace:
  <TASK>
  cachefiles_prepare_read+0x1d7/0x3a0 [cachefiles]
  erofs_fscache_read_folios+0x188/0x220 [erofs]
  erofs_fscache_meta_readpage+0x106/0x160 [erofs]
  do_read_cache_folio+0x42a/0x590
  ? bdi_register_va.part.14+0x1a7/0x210
  ? super_setup_bdi_name+0x76/0xe0
  erofs_bread+0x5b/0x170 [erofs]
  erofs_fc_fill_super+0x12b/0xc50 [erofs]

This tracepoint uses rreq->inode, should set it when allocating.

Fixes: d435d53228 ("erofs: change to use asynchronous io for fscache readpage/readahead")
Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Reviewed-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20220527101800.22360-1-yinxin.x@bytedance.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2022-05-29 15:36:04 +08:00
..
compress.h erofs: introduce z_erofs_fixup_insize 2021-12-29 06:42:07 +08:00
data.c erofs: implement fscache-based metadata read 2022-05-18 00:11:20 +08:00
decompressor.c erofs: fix buffer copy overflow of ztailpacking feature 2022-05-17 23:38:14 +08:00
decompressor_lzma.c erofs: introduce z_erofs_fixup_insize 2021-12-29 06:42:07 +08:00
dir.c erofs: use meta buffers for reading directories 2022-03-17 00:09:02 +08:00
erofs_fs.h erofs: scan devices from device table 2022-05-18 00:11:21 +08:00
fscache.c erofs: fix crash when enable tracepoint cachefiles_prep_read 2022-05-29 15:36:04 +08:00
inode.c erofs: leave compressed inodes unsupported in fscache mode for now 2022-05-29 15:34:54 +08:00
internal.h erofs: implement fscache-based data read for non-inline layout 2022-05-18 00:11:20 +08:00
Kconfig erofs: register fscache volume 2022-05-18 00:11:19 +08:00
Makefile erofs: register fscache volume 2022-05-18 00:11:19 +08:00
namei.c erofs: make filesystem exportable 2022-05-17 23:48:54 +08:00
pcpubuf.c erofs: get rid of ->lru usage 2021-10-25 08:22:59 +08:00
super.c erofs: scan devices from device table 2022-05-18 00:11:21 +08:00
sysfs.c erofs: add 'fsid' mount option 2022-05-18 00:11:21 +08:00
tagptr.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
utils.c erofs: fix deadlock when shrink erofs slab 2021-11-23 14:58:16 +08:00
xattr.c erofs: use meta buffers for xattr operations 2022-01-04 23:47:08 +08:00
xattr.h erofs: use meta buffers for xattr operations 2022-01-04 23:47:08 +08:00
zdata.c erofs: fix use-after-free of on-stack io[] 2022-04-15 23:51:43 +08:00
zdata.h erofs: fix use-after-free of on-stack io[] 2022-04-15 23:51:43 +08:00
zmap.c erofs: clean up z_erofs_extent_lookback 2022-03-17 00:08:48 +08:00
zpvec.h erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-08 10:02:10 +08:00