* [syzbot] [serial?] INFO: task hung in vcs_open (8)
@ 2024-09-26 17:14 syzbot
2024-09-27 1:38 ` Lizhi Xu
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: syzbot @ 2024-09-26 17:14 UTC (permalink / raw)
To: gregkh, jirislaby, linux-kernel, linux-serial, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 88264981f208 Merge tag 'sched_ext-for-6.12' of git://git.k..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1187c19f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=74ffdb3b3fad1a43
dashboard link: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16aa3ca9980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1587c19f980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/87eaf0ad6d60/disk-88264981.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/30c01cf8bc82/vmlinux-88264981.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a1407424ea54/bzImage-88264981.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/a8a56914d1d8/mount_6.gz
Bisection is inconclusive: the issue happens on the oldest tested release.
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16154c80580000
final oops: https://syzkaller.appspot.com/x/report.txt?x=15154c80580000
console output: https://syzkaller.appspot.com/x/log.txt?x=11154c80580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
INFO: task syz-executor199:5270 blocked for more than 147 seconds.
Not tainted 6.11.0-syzkaller-08481-g88264981f208 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor199 state:D stack:27360 pid:5270 tgid:5255 ppid:5233 flags:0x00004006
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5315 [inline]
__schedule+0x1843/0x4ae0 kernel/sched/core.c:6674
__schedule_loop kernel/sched/core.c:6751 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6766
schedule_timeout+0xb0/0x310 kernel/time/timer.c:2591
___down_common kernel/locking/semaphore.c:225 [inline]
__down_common+0x346/0x7f0 kernel/locking/semaphore.c:246
down+0x84/0xc0 kernel/locking/semaphore.c:63
console_lock+0x145/0x1b0 kernel/printk/printk.c:2808
vcs_open+0x5d/0xd0 drivers/tty/vt/vc_screen.c:763
chrdev_open+0x521/0x600 fs/char_dev.c:414
do_dentry_open+0x978/0x1460 fs/open.c:958
vfs_open+0x3e/0x330 fs/open.c:1088
do_open fs/namei.c:3774 [inline]
path_openat+0x2c84/0x3590 fs/namei.c:3933
do_filp_open+0x235/0x490 fs/namei.c:3960
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [syzbot] [serial?] INFO: task hung in vcs_open (8)
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
@ 2024-09-27 1:38 ` Lizhi Xu
2024-09-27 2:05 ` syzbot
2024-09-27 2:13 ` [PATCH] nilfs2: add ratelimiting to nilfs2 message Lizhi Xu
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 1:38 UTC (permalink / raw)
To: syzbot+8a192e8d090fa9a31135
Cc: gregkh, jirislaby, linux-kernel, linux-serial, syzkaller-bugs
limit the nilfs erros message output
#syz test
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..0a89dda75414 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -32,6 +32,7 @@
#include <linux/pagemap.h>
#include "nilfs.h"
#include "page.h"
+#include <linux/ratelimit.h>
static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
{
@@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
size_t limit = folio_size(folio);
struct nilfs_dir_entry *p;
char *error;
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
if (dir->i_size < folio_pos(folio) + limit) {
limit = dir->i_size - folio_pos(folio);
@@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
/* Too bad, we had an error */
Ebadsize:
- nilfs_error(sb,
- "size of directory #%lu is not a multiple of chunk size",
- dir->i_ino);
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "size of directory #%lu is not a multiple of chunk size",
+ dir->i_ino);
+ }
goto fail;
Eshort:
error = "rec_len is smaller than minimal";
@@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
Einumber:
error = "disallowed inode number";
bad_entry:
- nilfs_error(sb,
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
"bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode),
rec_len, p->name_len);
+ }
goto fail;
Eend:
p = (struct nilfs_dir_entry *)(kaddr + offs);
- nilfs_error(sb,
- "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
- dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
- (unsigned long)le64_to_cpu(p->inode));
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
+ dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
+ (unsigned long)le64_to_cpu(p->inode));
+ }
fail:
return false;
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [syzbot] [serial?] INFO: task hung in vcs_open (8)
2024-09-27 1:38 ` Lizhi Xu
@ 2024-09-27 2:05 ` syzbot
0 siblings, 0 replies; 14+ messages in thread
From: syzbot @ 2024-09-27 2:05 UTC (permalink / raw)
To: gregkh, jirislaby, linux-kernel, linux-serial, lizhi.xu, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
no output from test machine
Tested on:
commit: 075dbe9f Merge tag 'soc-ep93xx-dt-6.12' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1305aaa9980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f7f1af2ec501f918
dashboard link: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=158be59f980000
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
2024-09-27 1:38 ` Lizhi Xu
@ 2024-09-27 2:13 ` Lizhi Xu
2024-09-27 4:59 ` Jiri Slaby
2024-09-27 13:46 ` Lizhi Xu
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 2:13 UTC (permalink / raw)
To: syzbot+8a192e8d090fa9a31135
Cc: gregkh, jirislaby, linux-kernel, linux-serial, syzkaller-bugs
Syzbot report a task hung in vcs_open.
When rec_len too small in nilfs_check_folio, it can result in a huge flood
of messages being sent to the console. It eventually caused tty to hung when
retrieving the console_lock().
Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
---
fs/nilfs2/dir.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..0a89dda75414 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -32,6 +32,7 @@
#include <linux/pagemap.h>
#include "nilfs.h"
#include "page.h"
+#include <linux/ratelimit.h>
static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
{
@@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
size_t limit = folio_size(folio);
struct nilfs_dir_entry *p;
char *error;
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
if (dir->i_size < folio_pos(folio) + limit) {
limit = dir->i_size - folio_pos(folio);
@@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
/* Too bad, we had an error */
Ebadsize:
- nilfs_error(sb,
- "size of directory #%lu is not a multiple of chunk size",
- dir->i_ino);
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "size of directory #%lu is not a multiple of chunk size",
+ dir->i_ino);
+ }
goto fail;
Eshort:
error = "rec_len is smaller than minimal";
@@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
Einumber:
error = "disallowed inode number";
bad_entry:
- nilfs_error(sb,
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
"bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode),
rec_len, p->name_len);
+ }
goto fail;
Eend:
p = (struct nilfs_dir_entry *)(kaddr + offs);
- nilfs_error(sb,
- "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
- dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
- (unsigned long)le64_to_cpu(p->inode));
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
+ dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
+ (unsigned long)le64_to_cpu(p->inode));
+ }
fail:
return false;
}
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 2:13 ` [PATCH] nilfs2: add ratelimiting to nilfs2 message Lizhi Xu
@ 2024-09-27 4:59 ` Jiri Slaby
2024-09-27 9:16 ` Lizhi Xu
0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2024-09-27 4:59 UTC (permalink / raw)
To: Lizhi Xu, syzbot+8a192e8d090fa9a31135
Cc: gregkh, linux-kernel, linux-serial, syzkaller-bugs
You should have aimed this at the nilfs developers...
On 27. 09. 24, 4:13, Lizhi Xu wrote:
> Syzbot report a task hung in vcs_open.
> When rec_len too small in nilfs_check_folio, it can result in a huge flood
> of messages being sent to the console. It eventually caused tty to hung when
> retrieving the console_lock().
>
> Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
--
js
suse labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 4:59 ` Jiri Slaby
@ 2024-09-27 9:16 ` Lizhi Xu
2024-09-27 10:46 ` Jiri Slaby
0 siblings, 1 reply; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 9:16 UTC (permalink / raw)
To: jirislaby
Cc: gregkh, linux-kernel, linux-serial, lizhi.xu,
syzbot+8a192e8d090fa9a31135, syzkaller-bugs
On Fri, 27 Sep 2024 06:59:22 +0200, Jiri Slaby wrote:
> You should have aimed this at the nilfs developers...
I don't get it.
BR,
Lizhi
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 9:16 ` Lizhi Xu
@ 2024-09-27 10:46 ` Jiri Slaby
2024-09-27 13:46 ` Lizhi Xu
0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2024-09-27 10:46 UTC (permalink / raw)
To: Lizhi Xu
Cc: gregkh, linux-kernel, linux-serial, syzbot+8a192e8d090fa9a31135,
syzkaller-bugs
On 27. 09. 24, 11:16, Lizhi Xu wrote:
> On Fri, 27 Sep 2024 06:59:22 +0200, Jiri Slaby wrote:
>> You should have aimed this at the nilfs developers...
> I don't get it.
You are sending nilfs changes to tty maintainers which is not about right.
--
js
suse labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 10:46 ` Jiri Slaby
@ 2024-09-27 13:46 ` Lizhi Xu
0 siblings, 0 replies; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 13:46 UTC (permalink / raw)
To: jirislaby
Cc: gregkh, linux-kernel, linux-serial, lizhi.xu,
syzbot+8a192e8d090fa9a31135, syzkaller-bugs
On Fri, 27 Sep 2024 12:46:44 +0200, Jiri Slaby wrote:
> On 27. 09. 24, 11:16, Lizhi Xu wrote:
> > On Fri, 27 Sep 2024 06:59:22 +0200, Jiri Slaby wrote:
> >> You should have aimed this at the nilfs developers...
> > I don't get it.
>
> You are sending nilfs changes to tty maintainers which is not about right.
Got it, Thanks.
BR,
Lizhi
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
2024-09-27 1:38 ` Lizhi Xu
2024-09-27 2:13 ` [PATCH] nilfs2: add ratelimiting to nilfs2 message Lizhi Xu
@ 2024-09-27 13:46 ` Lizhi Xu
2024-09-27 15:19 ` Lizhi Xu
2024-09-28 3:53 ` [syzbot] [serial?] INFO: task hung in vcs_open (8) Ryusuke Konishi
2024-10-04 3:35 ` [PATCH] nilfs2: propagate directory read errors from nilfs_find_entry() Ryusuke Konishi
4 siblings, 1 reply; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 13:46 UTC (permalink / raw)
To: syzbot+8a192e8d090fa9a31135; +Cc: linux-kernel, konishi.ryusuke, syzkaller-bugs
Syzbot report a task hung in vcs_open.
When rec_len too small in nilfs_check_folio, it can result in a huge flood
of messages being sent to the console. It eventually caused tty to hung when
retrieving the console_lock().
Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
---
fs/nilfs2/dir.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..0a89dda75414 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -32,6 +32,7 @@
#include <linux/pagemap.h>
#include "nilfs.h"
#include "page.h"
+#include <linux/ratelimit.h>
static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
{
@@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
size_t limit = folio_size(folio);
struct nilfs_dir_entry *p;
char *error;
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
if (dir->i_size < folio_pos(folio) + limit) {
limit = dir->i_size - folio_pos(folio);
@@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
/* Too bad, we had an error */
Ebadsize:
- nilfs_error(sb,
- "size of directory #%lu is not a multiple of chunk size",
- dir->i_ino);
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "size of directory #%lu is not a multiple of chunk size",
+ dir->i_ino);
+ }
goto fail;
Eshort:
error = "rec_len is smaller than minimal";
@@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
Einumber:
error = "disallowed inode number";
bad_entry:
- nilfs_error(sb,
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
"bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode),
rec_len, p->name_len);
+ }
goto fail;
Eend:
p = (struct nilfs_dir_entry *)(kaddr + offs);
- nilfs_error(sb,
- "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
- dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
- (unsigned long)le64_to_cpu(p->inode));
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
+ dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
+ (unsigned long)le64_to_cpu(p->inode));
+ }
fail:
return false;
}
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 13:46 ` Lizhi Xu
@ 2024-09-27 15:19 ` Lizhi Xu
2024-09-27 18:18 ` Ryusuke Konishi
0 siblings, 1 reply; 14+ messages in thread
From: Lizhi Xu @ 2024-09-27 15:19 UTC (permalink / raw)
To: lizhi.xu
Cc: syzbot+8a192e8d090fa9a31135, linux-kernel, konishi.ryusuke,
linux-nilfs, syzkaller-bugs
Syzbot report a task hung in vcs_open.
When rec_len too small in nilfs_check_folio, it can result in a huge flood
of messages being sent to the console. It eventually caused tty to hung when
retrieving the console_lock().
Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
---
fs/nilfs2/dir.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..0a89dda75414 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -32,6 +32,7 @@
#include <linux/pagemap.h>
#include "nilfs.h"
#include "page.h"
+#include <linux/ratelimit.h>
static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
{
@@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
size_t limit = folio_size(folio);
struct nilfs_dir_entry *p;
char *error;
+ static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
if (dir->i_size < folio_pos(folio) + limit) {
limit = dir->i_size - folio_pos(folio);
@@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
/* Too bad, we had an error */
Ebadsize:
- nilfs_error(sb,
- "size of directory #%lu is not a multiple of chunk size",
- dir->i_ino);
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "size of directory #%lu is not a multiple of chunk size",
+ dir->i_ino);
+ }
goto fail;
Eshort:
error = "rec_len is smaller than minimal";
@@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
Einumber:
error = "disallowed inode number";
bad_entry:
- nilfs_error(sb,
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
"bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode),
rec_len, p->name_len);
+ }
goto fail;
Eend:
p = (struct nilfs_dir_entry *)(kaddr + offs);
- nilfs_error(sb,
- "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
- dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
- (unsigned long)le64_to_cpu(p->inode));
+ if (__ratelimit(&rs)) {
+ nilfs_error(sb,
+ "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
+ dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
+ (unsigned long)le64_to_cpu(p->inode));
+ }
fail:
return false;
}
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 15:19 ` Lizhi Xu
@ 2024-09-27 18:18 ` Ryusuke Konishi
2024-09-30 15:45 ` Ryusuke Konishi
0 siblings, 1 reply; 14+ messages in thread
From: Ryusuke Konishi @ 2024-09-27 18:18 UTC (permalink / raw)
To: Lizhi Xu
Cc: syzbot+8a192e8d090fa9a31135, linux-kernel, linux-nilfs, syzkaller-bugs
On Sat, Sep 28, 2024 at 12:19 AM Lizhi Xu wrote:
>
> Syzbot report a task hung in vcs_open.
> When rec_len too small in nilfs_check_folio, it can result in a huge flood
> of messages being sent to the console. It eventually caused tty to hung when
> retrieving the console_lock().
>
> Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
> ---
> fs/nilfs2/dir.c | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
Thank you for the patch.
I could confirm that the problem is reproducible and that your patch
prevents it, so I will treat this as a nilfs2 side issue.
The patch seems somewhat straightforward, so let me review this a bit
more. I may ask you to make some changes.
Thanks,
Ryusuke Konishi
>
> diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
> index fe5b1a30c509..0a89dda75414 100644
> --- a/fs/nilfs2/dir.c
> +++ b/fs/nilfs2/dir.c
> @@ -32,6 +32,7 @@
> #include <linux/pagemap.h>
> #include "nilfs.h"
> #include "page.h"
> +#include <linux/ratelimit.h>
>
> static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
> {
> @@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> size_t limit = folio_size(folio);
> struct nilfs_dir_entry *p;
> char *error;
> + static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
>
> if (dir->i_size < folio_pos(folio) + limit) {
> limit = dir->i_size - folio_pos(folio);
> @@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> /* Too bad, we had an error */
>
> Ebadsize:
> - nilfs_error(sb,
> - "size of directory #%lu is not a multiple of chunk size",
> - dir->i_ino);
> + if (__ratelimit(&rs)) {
> + nilfs_error(sb,
> + "size of directory #%lu is not a multiple of chunk size",
> + dir->i_ino);
> + }
> goto fail;
> Eshort:
> error = "rec_len is smaller than minimal";
> @@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> Einumber:
> error = "disallowed inode number";
> bad_entry:
> - nilfs_error(sb,
> + if (__ratelimit(&rs)) {
> + nilfs_error(sb,
> "bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
> dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
> (unsigned long)le64_to_cpu(p->inode),
> rec_len, p->name_len);
> + }
> goto fail;
> Eend:
> p = (struct nilfs_dir_entry *)(kaddr + offs);
> - nilfs_error(sb,
> - "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> - dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> - (unsigned long)le64_to_cpu(p->inode));
> + if (__ratelimit(&rs)) {
> + nilfs_error(sb,
> + "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> + dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> + (unsigned long)le64_to_cpu(p->inode));
> + }
> fail:
> return false;
> }
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [syzbot] [serial?] INFO: task hung in vcs_open (8)
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
` (2 preceding siblings ...)
2024-09-27 13:46 ` Lizhi Xu
@ 2024-09-28 3:53 ` Ryusuke Konishi
2024-10-04 3:35 ` [PATCH] nilfs2: propagate directory read errors from nilfs_find_entry() Ryusuke Konishi
4 siblings, 0 replies; 14+ messages in thread
From: Ryusuke Konishi @ 2024-09-28 3:53 UTC (permalink / raw)
To: syzbot; +Cc: Lizhi Xu, linux-nilfs, linux-kernel, syzkaller-bugs, linux-serial
On Fri, Sep 27, 2024 at 2:36 AM syzbot
<syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 88264981f208 Merge tag 'sched_ext-for-6.12' of git://git.k..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1187c19f980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=74ffdb3b3fad1a43
> dashboard link: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16aa3ca9980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1587c19f980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/87eaf0ad6d60/disk-88264981.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/30c01cf8bc82/vmlinux-88264981.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/a1407424ea54/bzImage-88264981.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/a8a56914d1d8/mount_6.gz
>
> Bisection is inconclusive: the issue happens on the oldest tested release.
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16154c80580000
> final oops: https://syzkaller.appspot.com/x/report.txt?x=15154c80580000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11154c80580000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
>
> INFO: task syz-executor199:5270 blocked for more than 147 seconds.
> Not tainted 6.11.0-syzkaller-08481-g88264981f208 #0
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> task:syz-executor199 state:D stack:27360 pid:5270 tgid:5255 ppid:5233 flags:0x00004006
> Call Trace:
> <TASK>
> context_switch kernel/sched/core.c:5315 [inline]
> __schedule+0x1843/0x4ae0 kernel/sched/core.c:6674
> __schedule_loop kernel/sched/core.c:6751 [inline]
> schedule+0x14b/0x320 kernel/sched/core.c:6766
> schedule_timeout+0xb0/0x310 kernel/time/timer.c:2591
> ___down_common kernel/locking/semaphore.c:225 [inline]
> __down_common+0x346/0x7f0 kernel/locking/semaphore.c:246
> down+0x84/0xc0 kernel/locking/semaphore.c:63
> console_lock+0x145/0x1b0 kernel/printk/printk.c:2808
> vcs_open+0x5d/0xd0 drivers/tty/vt/vc_screen.c:763
> chrdev_open+0x521/0x600 fs/char_dev.c:414
> do_dentry_open+0x978/0x1460 fs/open.c:958
> vfs_open+0x3e/0x330 fs/open.c:1088
> do_open fs/namei.c:3774 [inline]
> path_openat+0x2c84/0x3590 fs/namei.c:3933
> do_filp_open+0x235/0x490 fs/namei.c:3960
>
>
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
> If the report is already addressed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
>
> If you want to overwrite report's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the report is a duplicate of another one, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
>
The problem caused by this reproducer seems to be an issue on the
nilfs side based on testing with Lizhi's patch (not all logs recorded
are like that), so I will add a nilfs tag:
#syz set subsystems: nilfs, serial
Ryusuke Konishi
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nilfs2: add ratelimiting to nilfs2 message
2024-09-27 18:18 ` Ryusuke Konishi
@ 2024-09-30 15:45 ` Ryusuke Konishi
0 siblings, 0 replies; 14+ messages in thread
From: Ryusuke Konishi @ 2024-09-30 15:45 UTC (permalink / raw)
To: Lizhi Xu
Cc: syzbot+8a192e8d090fa9a31135, linux-kernel, linux-nilfs, syzkaller-bugs
On Sat, Sep 28, 2024 at 3:18 AM Ryusuke Konishi wrote:
>
> On Sat, Sep 28, 2024 at 12:19 AM Lizhi Xu wrote:
> >
> > Syzbot report a task hung in vcs_open.
> > When rec_len too small in nilfs_check_folio, it can result in a huge flood
> > of messages being sent to the console. It eventually caused tty to hung when
> > retrieving the console_lock().
> >
> > Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
> > Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
> > ---
> > fs/nilfs2/dir.c | 24 ++++++++++++++++--------
> > 1 file changed, 16 insertions(+), 8 deletions(-)
>
> Thank you for the patch.
>
> I could confirm that the problem is reproducible and that your patch
> prevents it, so I will treat this as a nilfs2 side issue.
>
> The patch seems somewhat straightforward, so let me review this a bit
> more. I may ask you to make some changes.
>
> Thanks,
> Ryusuke Konishi
Hi Lizhi,
I found that the root cause of this problem is that nilfs_find_entry()
does not abort the search loop even when nilfs_get_folio() returns an
error.
If the i_size of the directory inode is large and the directory is
corrupted, nilfs_find_entry() may continue to loop and output error
messages endlessly in bursts.
Rate-limiting may be able to prevent serial hangs, but it cannot
interrupt the near-endless loop in nilfs_find_entry(), so I don't
think it is the right approach to take to fix the problem.
Like ext2, nilfs_find_entry() should be able to return errors from
nilfs_get_folio() like this:
char *kaddr = nilfs_get_folio(dir, n, foliop);
if (IS_ERR(kaddr))
return ERR_CAST(kaddr);
However, this approach requires some preparation changes so that the
error code returned by nilfs_find_entry() can be propagated to its
callers.
So, would you mind letting me fix this?
Or, if you want to do it yourself, please let me know.
If you refer to the ext2 implementation, you should be able to figure
out how to fix it, even though there are some nilfs-specific
differences.
Thanks,
Ryusuke Konishi
>
> >
> > diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
> > index fe5b1a30c509..0a89dda75414 100644
> > --- a/fs/nilfs2/dir.c
> > +++ b/fs/nilfs2/dir.c
> > @@ -32,6 +32,7 @@
> > #include <linux/pagemap.h>
> > #include "nilfs.h"
> > #include "page.h"
> > +#include <linux/ratelimit.h>
> >
> > static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen)
> > {
> > @@ -115,6 +116,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > size_t limit = folio_size(folio);
> > struct nilfs_dir_entry *p;
> > char *error;
> > + static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 5, 1);
> >
> > if (dir->i_size < folio_pos(folio) + limit) {
> > limit = dir->i_size - folio_pos(folio);
> > @@ -148,9 +150,11 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > /* Too bad, we had an error */
> >
> > Ebadsize:
> > - nilfs_error(sb,
> > - "size of directory #%lu is not a multiple of chunk size",
> > - dir->i_ino);
> > + if (__ratelimit(&rs)) {
> > + nilfs_error(sb,
> > + "size of directory #%lu is not a multiple of chunk size",
> > + dir->i_ino);
> > + }
> > goto fail;
> > Eshort:
> > error = "rec_len is smaller than minimal";
> > @@ -167,18 +171,22 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > Einumber:
> > error = "disallowed inode number";
> > bad_entry:
> > - nilfs_error(sb,
> > + if (__ratelimit(&rs)) {
> > + nilfs_error(sb,
> > "bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
> > dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
> > (unsigned long)le64_to_cpu(p->inode),
> > rec_len, p->name_len);
> > + }
> > goto fail;
> > Eend:
> > p = (struct nilfs_dir_entry *)(kaddr + offs);
> > - nilfs_error(sb,
> > - "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> > - dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> > - (unsigned long)le64_to_cpu(p->inode));
> > + if (__ratelimit(&rs)) {
> > + nilfs_error(sb,
> > + "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> > + dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> > + (unsigned long)le64_to_cpu(p->inode));
> > + }
> > fail:
> > return false;
> > }
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] nilfs2: propagate directory read errors from nilfs_find_entry()
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
` (3 preceding siblings ...)
2024-09-28 3:53 ` [syzbot] [serial?] INFO: task hung in vcs_open (8) Ryusuke Konishi
@ 2024-10-04 3:35 ` Ryusuke Konishi
4 siblings, 0 replies; 14+ messages in thread
From: Ryusuke Konishi @ 2024-10-04 3:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-nilfs, syzbot, syzkaller-bugs, LKML, Lizhi Xu
Syzbot reported that a task hang occurs in vcs_open() during a fuzzing
test for nilfs2.
The root cause of this problem is that in nilfs_find_entry(), which
searches for directory entries, ignores errors when loading a
directory page/folio via nilfs_get_folio() fails.
If the filesystem images is corrupted, and the i_size of the directory
inode is large, and the directory page/folio is successfully read but
fails the sanity check, for example when it is zero-filled,
nilfs_check_folio() may continue to spit out error messages in bursts.
Fix this issue by propagating the error to the callers when loading a
page/folio fails in nilfs_find_entry().
The current interface of nilfs_find_entry() and its callers is
outdated and cannot propagate error codes such as -EIO and -ENOMEM
returned via nilfs_find_entry(), so fix it together.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: Lizhi Xu <lizhi.xu@windriver.com>
Closes: https://lkml.kernel.org/r/20240927013806.3577931-1-lizhi.xu@windriver.com
Reported-by: syzbot+8a192e8d090fa9a31135@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8a192e8d090fa9a31135
Fixes: 2ba466d74ed7 ("nilfs2: directory entry operations")
Cc: stable@vger.kernel.org
---
Hi Andrew, please apply this as a bug fix.
This fixes a flaw in nilfs2's directory lookup error handling that was
the root cause of the vcs hang issue recently reported by syzbot.
Thanks,
Ryusuke Konishi
fs/nilfs2/dir.c | 48 ++++++++++++++++++++++++-----------------------
fs/nilfs2/namei.c | 39 +++++++++++++++++++++++++-------------
fs/nilfs2/nilfs.h | 2 +-
3 files changed, 52 insertions(+), 37 deletions(-)
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..a8602729586a 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -289,7 +289,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx)
* The folio is mapped and unlocked. When the caller is finished with
* the entry, it should call folio_release_kmap().
*
- * On failure, returns NULL and the caller should ignore foliop.
+ * On failure, returns an error pointer and the caller should ignore foliop.
*/
struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
const struct qstr *qstr, struct folio **foliop)
@@ -312,22 +312,24 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
do {
char *kaddr = nilfs_get_folio(dir, n, foliop);
- if (!IS_ERR(kaddr)) {
- de = (struct nilfs_dir_entry *)kaddr;
- kaddr += nilfs_last_byte(dir, n) - reclen;
- while ((char *) de <= kaddr) {
- if (de->rec_len == 0) {
- nilfs_error(dir->i_sb,
- "zero-length directory entry");
- folio_release_kmap(*foliop, kaddr);
- goto out;
- }
- if (nilfs_match(namelen, name, de))
- goto found;
- de = nilfs_next_entry(de);
+ if (IS_ERR(kaddr))
+ return ERR_CAST(kaddr);
+
+ de = (struct nilfs_dir_entry *)kaddr;
+ kaddr += nilfs_last_byte(dir, n) - reclen;
+ while ((char *)de <= kaddr) {
+ if (de->rec_len == 0) {
+ nilfs_error(dir->i_sb,
+ "zero-length directory entry");
+ folio_release_kmap(*foliop, kaddr);
+ goto out;
}
- folio_release_kmap(*foliop, kaddr);
+ if (nilfs_match(namelen, name, de))
+ goto found;
+ de = nilfs_next_entry(de);
}
+ folio_release_kmap(*foliop, kaddr);
+
if (++n >= npages)
n = 0;
/* next folio is past the blocks we've got */
@@ -340,7 +342,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
}
} while (n != start);
out:
- return NULL;
+ return ERR_PTR(-ENOENT);
found:
ei->i_dir_start_lookup = n;
@@ -384,18 +386,18 @@ struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct folio **foliop)
return NULL;
}
-ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr)
+int nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr, ino_t *ino)
{
- ino_t res = 0;
struct nilfs_dir_entry *de;
struct folio *folio;
de = nilfs_find_entry(dir, qstr, &folio);
- if (de) {
- res = le64_to_cpu(de->inode);
- folio_release_kmap(folio, de);
- }
- return res;
+ if (IS_ERR(de))
+ return PTR_ERR(de);
+
+ *ino = le64_to_cpu(de->inode);
+ folio_release_kmap(folio, de);
+ return 0;
}
void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index c950139db6ef..4905063790c5 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -55,12 +55,20 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
{
struct inode *inode;
ino_t ino;
+ int res;
if (dentry->d_name.len > NILFS_NAME_LEN)
return ERR_PTR(-ENAMETOOLONG);
- ino = nilfs_inode_by_name(dir, &dentry->d_name);
- inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL;
+ res = nilfs_inode_by_name(dir, &dentry->d_name, &ino);
+ if (res) {
+ if (res != -ENOENT)
+ return ERR_PTR(res);
+ inode = NULL;
+ } else {
+ inode = nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino);
+ }
+
return d_splice_alias(inode, dentry);
}
@@ -263,10 +271,11 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
struct folio *folio;
int err;
- err = -ENOENT;
de = nilfs_find_entry(dir, &dentry->d_name, &folio);
- if (!de)
+ if (IS_ERR(de)) {
+ err = PTR_ERR(de);
goto out;
+ }
inode = d_inode(dentry);
err = -EIO;
@@ -362,10 +371,11 @@ static int nilfs_rename(struct mnt_idmap *idmap,
if (unlikely(err))
return err;
- err = -ENOENT;
old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_folio);
- if (!old_de)
+ if (IS_ERR(old_de)) {
+ err = PTR_ERR(old_de);
goto out;
+ }
if (S_ISDIR(old_inode->i_mode)) {
err = -EIO;
@@ -382,10 +392,12 @@ static int nilfs_rename(struct mnt_idmap *idmap,
if (dir_de && !nilfs_empty_dir(new_inode))
goto out_dir;
- err = -ENOENT;
- new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, &new_folio);
- if (!new_de)
+ new_de = nilfs_find_entry(new_dir, &new_dentry->d_name,
+ &new_folio);
+ if (IS_ERR(new_de)) {
+ err = PTR_ERR(new_de);
goto out_dir;
+ }
nilfs_set_link(new_dir, new_de, new_folio, old_inode);
folio_release_kmap(new_folio, new_de);
nilfs_mark_inode_dirty(new_dir);
@@ -440,12 +452,13 @@ static int nilfs_rename(struct mnt_idmap *idmap,
*/
static struct dentry *nilfs_get_parent(struct dentry *child)
{
- unsigned long ino;
+ ino_t ino;
+ int res;
struct nilfs_root *root;
- ino = nilfs_inode_by_name(d_inode(child), &dotdot_name);
- if (!ino)
- return ERR_PTR(-ENOENT);
+ res = nilfs_inode_by_name(d_inode(child), &dotdot_name, &ino);
+ if (res)
+ return ERR_PTR(res);
root = NILFS_I(d_inode(child))->i_root;
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h
index fb1c4c5bae7c..45d03826eaf1 100644
--- a/fs/nilfs2/nilfs.h
+++ b/fs/nilfs2/nilfs.h
@@ -254,7 +254,7 @@ static inline __u32 nilfs_mask_flags(umode_t mode, __u32 flags)
/* dir.c */
int nilfs_add_link(struct dentry *, struct inode *);
-ino_t nilfs_inode_by_name(struct inode *, const struct qstr *);
+int nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr, ino_t *ino);
int nilfs_make_empty(struct inode *, struct inode *);
struct nilfs_dir_entry *nilfs_find_entry(struct inode *, const struct qstr *,
struct folio **);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-10-04 3:37 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-26 17:14 [syzbot] [serial?] INFO: task hung in vcs_open (8) syzbot
2024-09-27 1:38 ` Lizhi Xu
2024-09-27 2:05 ` syzbot
2024-09-27 2:13 ` [PATCH] nilfs2: add ratelimiting to nilfs2 message Lizhi Xu
2024-09-27 4:59 ` Jiri Slaby
2024-09-27 9:16 ` Lizhi Xu
2024-09-27 10:46 ` Jiri Slaby
2024-09-27 13:46 ` Lizhi Xu
2024-09-27 13:46 ` Lizhi Xu
2024-09-27 15:19 ` Lizhi Xu
2024-09-27 18:18 ` Ryusuke Konishi
2024-09-30 15:45 ` Ryusuke Konishi
2024-09-28 3:53 ` [syzbot] [serial?] INFO: task hung in vcs_open (8) Ryusuke Konishi
2024-10-04 3:35 ` [PATCH] nilfs2: propagate directory read errors from nilfs_find_entry() Ryusuke Konishi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®