* [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-08-13 20:49 ` syzbot
0 siblings, 0 replies; 15+ messages in thread
From: syzbot @ 2024-08-13 20:49 UTC (permalink / raw)
To: chao, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 9e6869691724 Add linux-next specific files for 20240812
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=177ea68d980000
kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
dashboard link: https://syzkaller.appspot.com/bug?extid=78ff2855f26377625419
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=13deecd5980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c1fdd9980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f1b086192f50/disk-9e686969.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b457920fb52e/vmlinux-9e686969.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e63ba9cce98a/bzImage-9e686969.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/a0c7f05fa485/mount_0.gz
The issue was bisected to:
commit 7566a155c666dd23b413a002a50cd9ae7b95f053
Author: Chao Yu <chao@kernel.org>
Date: Tue Jun 25 03:13:49 2024 +0000
f2fs: atomic: fix to not allow GC to pollute atomic_file
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1255068d980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=1155068d980000
console output: https://syzkaller.appspot.com/x/log.txt?x=1655068d980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Try to recover 1th superblock, ret: 0
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
syz-executor306: attempt to access beyond end of device
loop0: rw=2049, sector=45096, nr_sectors = 64 limit=40427
================================================
WARNING: lock held when returning to user space!
6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
------------------------------------------------
syz-executor306/5229 is leaving the kernel with locks still held!
1 lock held by syz-executor306/5229:
#0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
#0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_commit_atomic_write+0x105/0x1510 fs/f2fs/segment.c:388
---
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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread* [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-08-13 20:49 ` syzbot
0 siblings, 0 replies; 15+ messages in thread
From: syzbot @ 2024-08-13 20:49 UTC (permalink / raw)
To: chao, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 9e6869691724 Add linux-next specific files for 20240812
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=177ea68d980000
kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
dashboard link: https://syzkaller.appspot.com/bug?extid=78ff2855f26377625419
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=13deecd5980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c1fdd9980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f1b086192f50/disk-9e686969.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b457920fb52e/vmlinux-9e686969.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e63ba9cce98a/bzImage-9e686969.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/a0c7f05fa485/mount_0.gz
The issue was bisected to:
commit 7566a155c666dd23b413a002a50cd9ae7b95f053
Author: Chao Yu <chao@kernel.org>
Date: Tue Jun 25 03:13:49 2024 +0000
f2fs: atomic: fix to not allow GC to pollute atomic_file
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1255068d980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=1155068d980000
console output: https://syzkaller.appspot.com/x/log.txt?x=1655068d980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Try to recover 1th superblock, ret: 0
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
syz-executor306: attempt to access beyond end of device
loop0: rw=2049, sector=45096, nr_sectors = 64 limit=40427
================================================
WARNING: lock held when returning to user space!
6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
------------------------------------------------
syz-executor306/5229 is leaving the kernel with locks still held!
1 lock held by syz-executor306/5229:
#0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
#0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_commit_atomic_write+0x105/0x1510 fs/f2fs/segment.c:388
---
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] 15+ messages in thread* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-13 20:49 ` syzbot
@ 2024-08-14 0:48 ` Edward Adam Davis
-1 siblings, 0 replies; 15+ messages in thread
From: Edward Adam Davis via Linux-f2fs-devel @ 2024-08-14 0:48 UTC (permalink / raw)
To: syzbot+78ff2855f26377625419
Cc: jaegeuk, syzkaller-bugs, linux-kernel, linux-f2fs-devel
unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
#syz test: net-next 9e6869691724
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 741e46f9d0fd..a43054ab0cf1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (err)
- return err;
+ goto out;
/* writeback GCing page of cow_inode */
err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
0, LLONG_MAX);
if (err)
- return err;
+ goto out;
filemap_invalidate_lock(inode->i_mapping);
@@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
f2fs_unlock_op(sbi);
filemap_invalidate_unlock(inode->i_mapping);
+out:
f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
return err;
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-08-14 0:48 ` Edward Adam Davis
0 siblings, 0 replies; 15+ messages in thread
From: Edward Adam Davis @ 2024-08-14 0:48 UTC (permalink / raw)
To: syzbot+78ff2855f26377625419
Cc: chao, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
#syz test: net-next 9e6869691724
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 741e46f9d0fd..a43054ab0cf1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (err)
- return err;
+ goto out;
/* writeback GCing page of cow_inode */
err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
0, LLONG_MAX);
if (err)
- return err;
+ goto out;
filemap_invalidate_lock(inode->i_mapping);
@@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
f2fs_unlock_op(sbi);
filemap_invalidate_unlock(inode->i_mapping);
+out:
f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
return err;
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-14 0:48 ` Edward Adam Davis
@ 2024-08-14 3:21 ` syzbot
-1 siblings, 0 replies; 15+ messages in thread
From: syzbot @ 2024-08-14 3:21 UTC (permalink / raw)
To: chao, eadavis, jaegeuk, linux-f2fs-devel, linux-kernel,
syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to checkout kernel repo git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git on commit 9e6869691724: failed to run ["git" "checkout" "9e6869691724"]: exit status 1
error: pathspec '9e6869691724' did not match any file(s) known to git
Tested on:
commit: [unknown
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9e6869691724
kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
dashboard link: https://syzkaller.appspot.com/bug?extid=78ff2855f26377625419
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=13f2af7d980000
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-14 0:48 ` Edward Adam Davis
@ 2024-08-14 3:33 ` Chao Yu
-1 siblings, 0 replies; 15+ messages in thread
From: Chao Yu @ 2024-08-14 3:33 UTC (permalink / raw)
To: Edward Adam Davis, syzbot+78ff2855f26377625419
Cc: jaegeuk, syzkaller-bugs, linux-kernel, linux-f2fs-devel
On 2024/8/14 8:48, Edward Adam Davis wrote:
> unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
>
> Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Since original patch has not been merged, if you don't mind, I'd like to
fix this issue in original patch.
Thanks,
> Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
>
> #syz test: net-next 9e6869691724
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 741e46f9d0fd..a43054ab0cf1 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
>
> err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
> if (err)
> - return err;
> + goto out;
>
> /* writeback GCing page of cow_inode */
> err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
> 0, LLONG_MAX);
> if (err)
> - return err;
> + goto out;
>
> filemap_invalidate_lock(inode->i_mapping);
>
> @@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
> f2fs_unlock_op(sbi);
>
> filemap_invalidate_unlock(inode->i_mapping);
> +out:
> f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
>
> return err;
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-08-14 3:33 ` Chao Yu
0 siblings, 0 replies; 15+ messages in thread
From: Chao Yu @ 2024-08-14 3:33 UTC (permalink / raw)
To: Edward Adam Davis, syzbot+78ff2855f26377625419
Cc: jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
On 2024/8/14 8:48, Edward Adam Davis wrote:
> unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
>
> Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Since original patch has not been merged, if you don't mind, I'd like to
fix this issue in original patch.
Thanks,
> Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
>
> #syz test: net-next 9e6869691724
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 741e46f9d0fd..a43054ab0cf1 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
>
> err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
> if (err)
> - return err;
> + goto out;
>
> /* writeback GCing page of cow_inode */
> err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
> 0, LLONG_MAX);
> if (err)
> - return err;
> + goto out;
>
> filemap_invalidate_lock(inode->i_mapping);
>
> @@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
> f2fs_unlock_op(sbi);
>
> filemap_invalidate_unlock(inode->i_mapping);
> +out:
> f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
>
> return err;
>
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-14 3:33 ` Chao Yu
@ 2024-08-14 6:01 ` Edward Adam Davis
-1 siblings, 0 replies; 15+ messages in thread
From: Edward Adam Davis via Linux-f2fs-devel @ 2024-08-14 6:01 UTC (permalink / raw)
To: chao
Cc: eadavis, syzkaller-bugs, linux-kernel, linux-f2fs-devel, jaegeuk,
syzbot+78ff2855f26377625419
On Wed, 14 Aug 2024 11:33:32 +0800, Chao Yu wrote:
> > unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
> >
> > Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
>
> Since original patch has not been merged, if you don't mind, I'd like to
> fix this issue in original patch.
Okay, it's a small matter.
>
> Thanks,
>
> > Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-08-14 6:01 ` Edward Adam Davis
0 siblings, 0 replies; 15+ messages in thread
From: Edward Adam Davis @ 2024-08-14 6:01 UTC (permalink / raw)
To: chao
Cc: eadavis, jaegeuk, linux-f2fs-devel, linux-kernel,
syzbot+78ff2855f26377625419, syzkaller-bugs
On Wed, 14 Aug 2024 11:33:32 +0800, Chao Yu wrote:
> > unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
> >
> > Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
>
> Since original patch has not been merged, if you don't mind, I'd like to
> fix this issue in original patch.
Okay, it's a small matter.
>
> Thanks,
>
> > Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-13 20:49 ` syzbot
(?)
(?)
@ 2024-08-14 1:01 ` Edward Adam Davis
2024-08-14 3:58 ` syzbot
-1 siblings, 1 reply; 15+ messages in thread
From: Edward Adam Davis @ 2024-08-14 1:01 UTC (permalink / raw)
To: syzbot+78ff2855f26377625419; +Cc: linux-kernel, syzkaller-bugs
unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
correct git tree to linux-next
#syz test: linux-next 9e6869691724
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 741e46f9d0fd..a43054ab0cf1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (err)
- return err;
+ goto out;
/* writeback GCing page of cow_inode */
err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
0, LLONG_MAX);
if (err)
- return err;
+ goto out;
filemap_invalidate_lock(inode->i_mapping);
@@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
f2fs_unlock_op(sbi);
filemap_invalidate_unlock(inode->i_mapping);
+out:
f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
return err;
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-13 20:49 ` syzbot
@ 2024-09-05 1:31 ` Chao Yu
-1 siblings, 0 replies; 15+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2024-09-05 1:31 UTC (permalink / raw)
To: syzbot, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
#syz invalid
Becuase commit "f2fs: atomic: fix to not allow GC to pollute atomic_file" has
been dropped from linux-next git repo.
On 2024/8/14 4:49, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9e6869691724 Add linux-next specific files for 20240812
> git tree: linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=177ea68d980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
> dashboard link: https://syzkaller.appspot.com/bug?extid=78ff2855f26377625419
> 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=13deecd5980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c1fdd9980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/f1b086192f50/disk-9e686969.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b457920fb52e/vmlinux-9e686969.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/e63ba9cce98a/bzImage-9e686969.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/a0c7f05fa485/mount_0.gz
>
> The issue was bisected to:
>
> commit 7566a155c666dd23b413a002a50cd9ae7b95f053
> Author: Chao Yu <chao@kernel.org>
> Date: Tue Jun 25 03:13:49 2024 +0000
>
> f2fs: atomic: fix to not allow GC to pollute atomic_file
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1255068d980000
> final oops: https://syzkaller.appspot.com/x/report.txt?x=1155068d980000
> console output: https://syzkaller.appspot.com/x/log.txt?x=1655068d980000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
> Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
>
> F2FS-fs (loop0): Found nat_bits in checkpoint
> F2FS-fs (loop0): Try to recover 1th superblock, ret: 0
> F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
> syz-executor306: attempt to access beyond end of device
> loop0: rw=2049, sector=45096, nr_sectors = 64 limit=40427
> ================================================
> WARNING: lock held when returning to user space!
> 6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
> ------------------------------------------------
> syz-executor306/5229 is leaving the kernel with locks still held!
> 1 lock held by syz-executor306/5229:
> #0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
> #0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_commit_atomic_write+0x105/0x1510 fs/f2fs/segment.c:388
>
>
> ---
> 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
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
@ 2024-09-05 1:31 ` Chao Yu
0 siblings, 0 replies; 15+ messages in thread
From: Chao Yu @ 2024-09-05 1:31 UTC (permalink / raw)
To: syzbot, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
#syz invalid
Becuase commit "f2fs: atomic: fix to not allow GC to pollute atomic_file" has
been dropped from linux-next git repo.
On 2024/8/14 4:49, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9e6869691724 Add linux-next specific files for 20240812
> git tree: linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=177ea68d980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
> dashboard link: https://syzkaller.appspot.com/bug?extid=78ff2855f26377625419
> 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=13deecd5980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c1fdd9980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/f1b086192f50/disk-9e686969.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b457920fb52e/vmlinux-9e686969.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/e63ba9cce98a/bzImage-9e686969.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/a0c7f05fa485/mount_0.gz
>
> The issue was bisected to:
>
> commit 7566a155c666dd23b413a002a50cd9ae7b95f053
> Author: Chao Yu <chao@kernel.org>
> Date: Tue Jun 25 03:13:49 2024 +0000
>
> f2fs: atomic: fix to not allow GC to pollute atomic_file
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1255068d980000
> final oops: https://syzkaller.appspot.com/x/report.txt?x=1155068d980000
> console output: https://syzkaller.appspot.com/x/log.txt?x=1655068d980000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
> Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
>
> F2FS-fs (loop0): Found nat_bits in checkpoint
> F2FS-fs (loop0): Try to recover 1th superblock, ret: 0
> F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
> syz-executor306: attempt to access beyond end of device
> loop0: rw=2049, sector=45096, nr_sectors = 64 limit=40427
> ================================================
> WARNING: lock held when returning to user space!
> 6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
> ------------------------------------------------
> syz-executor306/5229 is leaving the kernel with locks still held!
> 1 lock held by syz-executor306/5229:
> #0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
> #0: ffff8880473a18b0 (&fi->i_gc_rwsem[WRITE]){+.+.}-{3:3}, at: f2fs_commit_atomic_write+0x105/0x1510 fs/f2fs/segment.c:388
>
>
> ---
> 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
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_ioc_start_atomic_write
@ 2024-08-14 11:51 syzbot
2024-08-14 13:36 ` [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write Edward Adam Davis
0 siblings, 1 reply; 15+ messages in thread
From: syzbot @ 2024-08-14 11:51 UTC (permalink / raw)
To: chao, jaegeuk, linux-f2fs-devel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 9e6869691724 Add linux-next specific files for 20240812
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1431e405980000
kernel config: https://syzkaller.appspot.com/x/.config?x=61ba6f3b22ee5467
dashboard link: https://syzkaller.appspot.com/bug?extid=733300ca0a9baca7e245
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=120ed77d980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=130e0ef3980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f1b086192f50/disk-9e686969.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b457920fb52e/vmlinux-9e686969.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e63ba9cce98a/bzImage-9e686969.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/08b48c782593/mount_0.gz
The issue was bisected to:
commit 374a8881ce4ccf787f5381a39f825cb17a3f6b14
Author: Chao Yu <chao@kernel.org>
Date: Tue Jun 25 03:13:51 2024 +0000
f2fs: atomic: fix to forbid dio in atomic_file
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10741429980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=12741429980000
console output: https://syzkaller.appspot.com/x/log.txt?x=14741429980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+733300ca0a9baca7e245@syzkaller.appspotmail.com
Fixes: 374a8881ce4c ("f2fs: atomic: fix to forbid dio in atomic_file")
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5
syz-executor312: attempt to access beyond end of device
loop0: rw=10241, sector=45096, nr_sectors = 8 limit=40427
================================================
WARNING: lock held when returning to user space!
6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
------------------------------------------------
syz-executor312/5227 is leaving the kernel with locks still held!
1 lock held by syz-executor312/5227:
#0: ffff8880695aa0e0 (&fi->i_gc_rwsem[READ]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
#0: ffff8880695aa0e0 (&fi->i_gc_rwsem[READ]){+.+.}-{3:3}, at: f2fs_ioc_start_atomic_write+0x2ed/0xac0 fs/f2fs/file.c:2163
---
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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write
2024-08-14 11:51 [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_ioc_start_atomic_write syzbot
@ 2024-08-14 13:36 ` Edward Adam Davis
0 siblings, 0 replies; 15+ messages in thread
From: Edward Adam Davis @ 2024-08-14 13:36 UTC (permalink / raw)
To: syzbot+733300ca0a9baca7e245; +Cc: linux-kernel, syzkaller-bugs
unlock i_gc_rwsem[WRITE] before quiting f2fs_commit_atomic_write
Fixes: 7566a155c666 ("f2fs: atomic: fix to not allow GC to pollute atomic_file")
Reported-by: syzbot+78ff2855f26377625419@syzkaller.appspotmail.com
correct git tree to linux-next
#syz test: linux-next 9e6869691724
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 741e46f9d0fd..a43054ab0cf1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -389,13 +389,13 @@ int f2fs_commit_atomic_write(struct inode *inode)
err = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (err)
- return err;
+ goto out;
/* writeback GCing page of cow_inode */
err = filemap_write_and_wait_range(fi->cow_inode->i_mapping,
0, LLONG_MAX);
if (err)
- return err;
+ goto out;
filemap_invalidate_lock(inode->i_mapping);
@@ -407,6 +407,7 @@ int f2fs_commit_atomic_write(struct inode *inode)
f2fs_unlock_op(sbi);
filemap_invalidate_unlock(inode->i_mapping);
+out:
f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
return err;
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-09-05 1:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13 20:49 [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write syzbot
2024-08-13 20:49 ` syzbot
2024-08-14 0:48 ` [f2fs-dev] " Edward Adam Davis via Linux-f2fs-devel
2024-08-14 0:48 ` Edward Adam Davis
2024-08-14 3:21 ` [f2fs-dev] " syzbot
2024-08-14 3:21 ` syzbot
2024-08-14 3:33 ` [f2fs-dev] " Chao Yu
2024-08-14 3:33 ` Chao Yu
2024-08-14 6:01 ` [f2fs-dev] " Edward Adam Davis via Linux-f2fs-devel
2024-08-14 6:01 ` Edward Adam Davis
2024-08-14 1:01 ` Edward Adam Davis
2024-08-14 3:58 ` syzbot
2024-09-05 1:31 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2024-09-05 1:31 ` Chao Yu
-- strict thread matches above, loose matches on Subject: below --
2024-08-14 11:51 [f2fs-dev] [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_ioc_start_atomic_write syzbot
2024-08-14 13:36 ` [syzbot] [f2fs?] WARNING: lock held when returning to user space in f2fs_commit_atomic_write Edward Adam Davis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.