History

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.

Xin Yin committed 4 years ago

Commit b5cb79d1 parent 0130e4e1 file · +1 −0Browse files

Unified · Split

fs/erofs/fscache.c+1−0
@@ -17,6 +17,7 @@ static struct netfs_io_request *erofs_fscache_alloc_request(struct address_space · 16 unmodified lines
1717 rreq->start = start;
1818 rreq->len = len;
1919 rreq->mapping = mapping;
20+ rreq->inode = mapping->host;
2021 INIT_LIST_HEAD(&rreq->subrequests);
2122 refcount_set(&rreq->ref, 1);
2223 return rreq;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t