public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+0b9cadf5fc45a98a5083@syzkaller.appspotmail.com>
To: chao@kernel.org, jaegeuk@kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] possible deadlock in f2fs_write_checkpoint
Date: Fri, 14 Jan 2022 01:09:16 -0800	[thread overview]
Message-ID: <0000000000004cede805d58728c3@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    57c149e506d5 Add linux-next specific files for 20220110
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=15cb8b77b00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2f1cca5543ac6349
dashboard link: https://syzkaller.appspot.com/bug?extid=0b9cadf5fc45a98a5083
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0b9cadf5fc45a98a5083@syzkaller.appspotmail.com

============================================
WARNING: possible recursive locking detected
5.16.0-rc8-next-20220110-syzkaller #0 Not tainted
--------------------------------------------
f2fs_ckpt-7:2/4139 is trying to acquire lock:
ffff88807c598390 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2149 [inline]
ffff88807c598390 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: f2fs_write_checkpoint+0x535/0x5d00 fs/f2fs/checkpoint.c:1615

but task is already holding lock:
ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2149 [inline]
ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: __write_checkpoint_sync fs/f2fs/checkpoint.c:1744 [inline]
ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: __checkpoint_and_complete_reqs+0xdd/0x360 fs/f2fs/checkpoint.c:1764

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&sem->internal_rwsem#2);
  lock(&sem->internal_rwsem#2);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by f2fs_ckpt-7:2/4139:
 #0: ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2149 [inline]
 #0: ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: __write_checkpoint_sync fs/f2fs/checkpoint.c:1744 [inline]
 #0: ffff88807c599338 (&sem->internal_rwsem#2){+.+.}-{3:3}, at: __checkpoint_and_complete_reqs+0xdd/0x360 fs/f2fs/checkpoint.c:1764

stack backtrace:
CPU: 0 PID: 4139 Comm: f2fs_ckpt-7:2 Not tainted 5.16.0-rc8-next-20220110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
 check_deadlock kernel/locking/lockdep.c:2999 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027
 lock_acquire kernel/locking/lockdep.c:5639 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604
 down_write+0x90/0x150 kernel/locking/rwsem.c:1514
 f2fs_down_write fs/f2fs/f2fs.h:2149 [inline]
 f2fs_write_checkpoint+0x535/0x5d00 fs/f2fs/checkpoint.c:1615
 __write_checkpoint_sync fs/f2fs/checkpoint.c:1745 [inline]
 __checkpoint_and_complete_reqs+0xea/0x360 fs/f2fs/checkpoint.c:1764
 issue_checkpoint_thread+0xdf/0x250 fs/f2fs/checkpoint.c:1795
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>


---
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.

             reply	other threads:[~2022-01-14  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14  9:09 syzbot [this message]
2022-02-02 13:34 ` [syzbot] possible deadlock in f2fs_write_checkpoint syzbot
2022-02-03  2:23 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000004cede805d58728c3@google.com \
    --to=syzbot+0b9cadf5fc45a98a5083@syzkaller.appspotmail.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox