Re: [syzbot] [erofs?] BUG: using smp_processor_id() in preemptible code in z_erofs_get_gbuf

2024-04-08 Thread Gao Xiang
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev

Re: [PATCH v1] erofs: use raw_smp_processor_id() to get buffer from global buffer pool

2024-04-08 Thread Gao Xiang
On 2024/4/9 07:05, Sandeep Dhavale wrote: Thanks for catching this, since the original patch is for next upstream cycle, may I fold this fix in the original patch? Hi Gao, Sounds good. As the fix is simple, it makes sense to fold it into the original one. Thanks, Sandeep. Thanks,

Re: [PATCH v1] erofs: use raw_smp_processor_id() to get buffer from global buffer pool

2024-04-08 Thread Sandeep Dhavale via Linux-erofs
> > Thanks for catching this, since the original patch is > for next upstream cycle, may I fold this fix in the > original patch? > Hi Gao, Sounds good. As the fix is simple, it makes sense to fold it into the original one. Thanks, Sandeep.

Re: [PATCH v1] erofs: use raw_smp_processor_id() to get buffer from global buffer pool

2024-04-08 Thread Gao Xiang
Hi Sandeep, On 2024/4/9 05:52, Sandeep Dhavale wrote: erofs will decompress in the preemptible context (kworker or per cpu thread). As smp_processor_id() cannot be used in preemptible contexts, use raw_smp_processor_id() instead to index into global buffer pool. Reported-by:

[PATCH v1] erofs: use raw_smp_processor_id() to get buffer from global buffer pool

2024-04-08 Thread Sandeep Dhavale via Linux-erofs
erofs will decompress in the preemptible context (kworker or per cpu thread). As smp_processor_id() cannot be used in preemptible contexts, use raw_smp_processor_id() instead to index into global buffer pool. Reported-by: syzbot+27cc650ef45b379df...@syzkaller.appspotmail.com Fixes: 7a7513292cc6

[syzbot] [erofs?] BUG: using smp_processor_id() in preemptible code in z_erofs_get_gbuf

2024-04-08 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:2b3d5988ae2c Add linux-next specific files for 20240404 git tree: linux-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=150f9d2918 kernel config: https://syzkaller.appspot.com/x/.config?x=9c48fd2523cdee5e

Re: [PATCH 23/26] netfs: Cut over to using new writeback code

2024-04-08 Thread David Howells
David Howells wrote: > + /* Wait for writeback to complete. The writeback engine owns > + * the info in folio->private and may change it until it > + * removes the WB mark. > + */ > + if (folio_wait_writeback_killable(folio)) { > +

Re: [PATCH] erofs-utils: change temporal buffer to non static

2024-04-08 Thread Gao Xiang
Hi Yifan, On 2024/4/8 18:34, Yifan Zhao wrote: Hi Noboru, AFAIK, this `tryrecompress_trailing` is only used when `may_inline` is true, indicating that this segment is the last one in the file. In the current inner-file implementation, it means that only one worker will use the `tmp`

Re: [PATCH] erofs-utils: change temporal buffer to non static

2024-04-08 Thread Gao Xiang
On 2024/4/8 17:16, Noboru Asai wrote: In multi-threaded mode, each thread must use a different buffer in tryrecompress_trailing function, so change this buffer to non static. Signed-off-by: Noboru Asai Thanks for catching this! Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH] erofs-utils: change temporal buffer to non static

2024-04-08 Thread Yifan Zhao
Hi Noboru, AFAIK, this `tryrecompress_trailing` is only used when `may_inline` is true, indicating that this segment is the last one in the file. In the current inner-file implementation, it means that only one worker will use the `tmp` buffer at a given time. In fact, the `static`

[PATCH] erofs-utils: change temporal buffer to non static

2024-04-08 Thread Noboru Asai
In multi-threaded mode, each thread must use a different buffer in tryrecompress_trailing function, so change this buffer to non static. Signed-off-by: Noboru Asai --- lib/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress.c b/lib/compress.c index