From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+12479ae15958fc3f54ec@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] BUG: sleeping function called from invalid context in hook_sb_delete
Date: Wed, 24 Sep 2025 08:28:49 +0800 [thread overview]
Message-ID: <20250924002850.7530-1-hdanton@sina.com> (raw)
In-Reply-To: <68d32659.a70a0220.4f78.0012.GAE@google.com>
> Date: Tue, 23 Sep 2025 15:59:37 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: ce7f1a983b07 Add linux-next specific files for 20250923
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=118724e2580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1be6fa3d47bce66e
> dashboard link: https://syzkaller.appspot.com/bug?extid=12479ae15958fc3f54ec
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1376e27c580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=136e78e2580000
#syz test
--- x/security/landlock/fs.c
+++ y/security/landlock/fs.c
@@ -1434,8 +1434,6 @@ static void hook_sb_delete(struct super_
spin_unlock(&inode->i_lock);
continue;
}
- /* Keeps a reference to this inode until the next loop walk. */
- __iget(inode);
spin_unlock(&inode->i_lock);
/*
@@ -1457,15 +1455,6 @@ static void hook_sb_delete(struct super_
* It is therefore not necessary to lock inode->i_lock.
*/
rcu_assign_pointer(landlock_inode(inode)->object, NULL);
- /*
- * At this point, we own the ihold() reference that was
- * originally set up by get_inode_object() and the
- * __iget() reference that we just set in this loop
- * walk. Therefore the following call to iput() will
- * not sleep nor drop the inode because there is now at
- * least two references to it.
- */
- iput(inode);
} else {
spin_unlock(&object->lock);
rcu_read_unlock();
@@ -1479,12 +1468,7 @@ static void hook_sb_delete(struct super_
* disappear from under us until the next loop walk.
*/
spin_unlock(&sb->s_inode_list_lock);
- /*
- * We can now actually put the inode reference from the
- * previous loop walk, which is not needed anymore.
- */
iput(prev_inode);
- cond_resched();
spin_lock(&sb->s_inode_list_lock);
}
prev_inode = inode;
--
next prev parent reply other threads:[~2025-09-24 0:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 22:59 syzbot
2025-09-24 0:28 ` Hillf Danton [this message]
2025-09-24 0:56 ` syzbot
2025-09-24 9:44 ` Edward Adam Davis
2025-09-24 10:43 ` syzbot
2025-09-24 10:38 ` Edward Adam Davis
2025-09-24 10:46 ` Edward Adam Davis
2025-09-24 10:46 ` syzbot
2025-09-24 11:19 ` syzbot
2025-09-24 11:05 ` Jan Kara
2025-09-29 8:51 ` Christian Brauner
2025-10-09 20:56 ` syzbot
2025-11-01 15:32 ` Forwarded: " syzbot
2025-11-05 19:38 ` Forwarded: [PATCH v1] fs: Move might_sleep() annotation to iput_final() syzbot
[not found] <4f6e21b7-3c0d-4f99-bf3a-3f20fafa9591n@googlegroups.com>
2025-09-24 10:55 ` [syzbot] [fs?] BUG: sleeping function called from invalid context in hook_sb_delete syzbot
[not found] <20251101153157.837686-1-m@maowtm.org>
2025-11-01 16:18 ` syzbot
[not found] <20251105193800.2340868-1-mic@digikod.net>
2025-11-05 20:56 ` 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=20250924002850.7530-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+12479ae15958fc3f54ec@syzkaller.appspotmail.com \
--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
all inboxes | Powered by JetHome®