From: syzbot <syzbot+f6e8174215573a84b797@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: Testing for v4 scsi: target: fix recursive locking in __configfs_open_file()
Date: Sun, 08 Feb 2026 22:05:10 -0800 [thread overview]
Message-ID: <69897916.a00a0220.34fa92.003f.GAE@google.com> (raw)
In-Reply-To: <6767d8ea.050a0220.226966.0021.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Testing for v4 scsi: target: fix recursive locking in __configfs_open_file()
Author: activprithvi@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3a8660878839faadb4f1a6dd72c3179c1df56787
Signed-off-by: Prithvi Tambewagh <activprithvi@gmail.com>
---
drivers/target/target_core_configfs.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index b19acd662726..42709a3d68e9 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -108,7 +108,7 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
const char *page, size_t count)
{
ssize_t read_bytes;
- struct file *fp;
+ struct path path;
ssize_t r = -EINVAL;
mutex_lock(&target_devices_lock);
@@ -131,17 +131,12 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
db_root_stage[read_bytes - 1] = '\0';
/* validate new db root before accepting it */
- fp = filp_open(db_root_stage, O_RDONLY, 0);
- if (IS_ERR(fp)) {
+ r = kern_path(db_root_stage, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path);
+ if (r) {
pr_err("db_root: cannot open: %s\n", db_root_stage);
goto unlock;
}
- if (!S_ISDIR(file_inode(fp)->i_mode)) {
- filp_close(fp, NULL);
- pr_err("db_root: not a directory: %s\n", db_root_stage);
- goto unlock;
- }
- filp_close(fp, NULL);
+ path_put(&path);
strscpy(db_root, db_root_stage);
pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root);
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
--
2.34.1
next prev parent reply other threads:[~2026-02-09 6:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 9:16 [syzbot] [fs?] possible deadlock in __configfs_open_file syzbot
2026-01-08 17:32 ` Syzbot test for fixing recursive locking " Prithvi Tambewagh
2026-01-08 17:58 ` [syzbot] [fs?] possible deadlock " syzbot
2026-01-21 15:02 ` Testing for v2: configfs: add lock class key to struct configfs_fragment for frag_sem Prithvi Tambewagh
2026-01-21 15:19 ` [syzbot] [fs?] possible deadlock in __configfs_open_file syzbot
2026-02-06 9:02 ` Forwarded: Testing for v3: scsi: target: fix recursive locking in __configfs_open_file() syzbot
2026-02-06 16:04 ` syzbot
2026-02-07 10:43 ` Forwarded: Testing for v4: " syzbot
2026-02-08 16:41 ` syzbot
2026-02-09 5:14 ` Forwarded: Testing for v3 " syzbot
2026-02-09 6:05 ` syzbot [this message]
2026-02-09 14:29 ` Forwarded: Syzbot build test syzbot
2026-02-09 15:01 ` Forwarded: Testing for v4 scsi: target: fix recursive locking in __configfs_open_file() syzbot
2026-02-09 15:37 ` Forwarded: Testing for v4: " syzbot
2026-02-09 15:45 ` Forwarded: Testing for v4 " syzbot
2026-02-10 13:41 ` syzbot
2026-02-10 13:48 ` syzbot
2026-02-10 13:53 ` Forwarded: Testing for v4: " syzbot
2026-02-10 14:00 ` Forwarded: Testing for v4 " syzbot
2026-02-16 4:27 ` syzbot
2026-02-16 5:18 ` 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=69897916.a00a0220.34fa92.003f.GAE@google.com \
--to=syzbot+f6e8174215573a84b797@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 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.