From nobody Mon Apr 6 09:08:21 2026 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BCDB134CF for ; Mon, 9 Feb 2026 06:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770617111; cv=none; b=a4qJDEGl9FKVU8whPxlUdtrqSdewfaTj6TINaH99VyD15b1mYK+CO6sryTEfqN3bjtGVuBHlK8D8YUdj0r2nEak5g2zpYieyjrqWLt4A9Bd5ZcJSJkttekvucq20K5x7ixRNAecbOg6KS5V497NJLbB2rxFEo9hfRpnYO0osvNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770617111; c=relaxed/simple; bh=vSmnS7LMJbQW0xlT6payh+OKjAzFhAN33JVLh3HlyNg=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=Q+qdAW3b7pyCA/VP3oXndqH0EYth5pBt+ekW598AH9mQk9PZpXBiBVLgmBgpHqqq/hIUmC3nV/qxyisurTDc6YR8e+zXPHhixdw+Rt+QZ2xzlmgxvH/i+YIOuY9Qut7VWzF7AQpYdB5zqyG63DBnbWjYJiKsYrVz7C0pzE+trMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-662f738c3bfso14852865eaf.0 for ; Sun, 08 Feb 2026 22:05:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770617110; x=1771221910; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1s/gE0d66bX6uwGLzDGlRE5AsX2e6eKOUvz4wdeusPA=; b=b413dTfV2GN1EMn3ZMEfMQ2lwkbMuTsYYe5gDSyeEB05e0zW8elUKijOUHaL1GxJxU bC0aB/6RBvWEp72CRNzSUaB9DHZpsgSOAetJ0G/XzpvaUFamOSMByyUPGe4yeT25Gepz sxDBtxeaD+BFGpNthpKz3mnEUs9Emoxpq90vnHBuBUh9HVE50RDz6KVbgG801IqLESe9 NBoo6B8Zx1dD8dwWuJDvroRY08WHCTxni0Is/C8KFLzrsVqMkUD4jPNzak+btToZg2K0 HvTL7nxqa4bKeOXllQHZ4v6jdwLbW92UE6SmVORDIKEiAnSV7bagarYLA3p24aYjpahO 4Oyw== X-Gm-Message-State: AOJu0Yy+/BCGMSGgrsat7h309VUNWyOQb9pgtQ1udDc75JdZtfZ9m+t2 ecyCTMHrlhJnEuKHSRvhY6nRumK4H/CUWUmekhviWA2dnrDQBeIX2JIHW8+0znZKqkFnFSjktP5 z90bV3iUDHsmHXIYwJZ8bziK0DfH7ggg4yDDnwlw4+91irgSLniK6QJ4Inu0= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:4def:b0:662:c114:b29e with SMTP id 006d021491bc7-66d0a56ef42mr5318687eaf.24.1770617110235; Sun, 08 Feb 2026 22:05:10 -0800 (PST) Date: Sun, 08 Feb 2026 22:05:10 -0800 In-Reply-To: <6767d8ea.050a0220.226966.0021.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69897916.a00a0220.34fa92.003f.GAE@google.com> Subject: Forwarded: Testing for v4 scsi: target: fix recursive locking in __configfs_open_file() From: syzbot To: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_o= pen_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 --- 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 con= fig_item *item, const char *page, size_t count) { ssize_t read_bytes; - struct file *fp; + struct path path; ssize_t r =3D -EINVAL; =20 mutex_lock(&target_devices_lock); @@ -131,17 +131,12 @@ static ssize_t target_core_item_dbroot_store(struct c= onfig_item *item, db_root_stage[read_bytes - 1] =3D '\0'; =20 /* validate new db root before accepting it */ - fp =3D filp_open(db_root_stage, O_RDONLY, 0); - if (IS_ERR(fp)) { + r =3D 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); =20 strscpy(db_root, db_root_stage); pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root); base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787 --=20 2.34.1