From nobody Thu Apr 2 14:07:32 2026 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (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 4BBE427FB3A for ; Tue, 10 Feb 2026 13:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770731298; cv=none; b=bqW0w1szsl/gi5kQ/ir7rEpB7pkLNJTikMUWiNoWPjg7FtnsbjsNFpkTP0+M2EbsXy4+lRdhojNFuQcwmoCmtGa0zIjFxdAClEIZGe/dYTExodxgy90ziRa3iHeU30TC9YgLD2Ehj1foSk0bOVuSUFaqPpXMMNZqI4GTH6RqWro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770731298; c=relaxed/simple; bh=6xnWPlgFNMAewB6LrRxhvBh8pKym22PXpVXujJwwJb4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=cTL3m7ySe1Lofb6gIF2eNTP5QpvyQDNtqCpbztBHFiNiWJvoeJNYdO3LUEsOJzkjZPURoTSCYb5MAYEVLCyTBPPX898JxhGwfgEkOd3hmb/+o+Wbm+g0naOMEMG68Qwc9TlD16AYqvhdEUbDiB5q4jLcsRPX7vUD/n8XtcsuxAk= 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.210.72 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-ot1-f72.google.com with SMTP id 46e09a7af769-7d44c07f315so15984616a34.0 for ; Tue, 10 Feb 2026 05:48:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770731296; x=1771336096; 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=MpuyCizsoKEUf3WyHVUnSA3N5F90iua3IwMWT5CBqwc=; b=Wnh+L2hvlxaTGsgU3EyQkqHCpkejujSVS4U6DMlmyuRte3kW8NfwfOR4Wg9GOfONtu V8OoIAQ740hZOrafvC5P0PZfa2iHvji21smWj3wG0iuXys2SghTlChrJv8Vjyg+1nWPf n6saslDg8vl1wL1xMM9XObd6nwA57rja+mI82cLlQQC+6RdTFzCS3rgm5G0VWgeTX5EA bJE4tdVEqRurscgmq7RscD4xyAmywhYJ4oE6wT4IjOtK3oERP/+dZHrOiA1LfwPMjn4r jiXjKKPl4cPMOfMlNSoSu7dP1ZL7LFFKux8tOjvFbSI9D6MWe1p0rTja+3SeRDgtleH7 7SRQ== X-Gm-Message-State: AOJu0YzyHR1jyA8DNeGb/F/elguNmXhLfn1hjd7lRpFZHVMc4npTwg1y ZZWDSrUWxxrqC9+tykWeFEwuhwFznFFg05Ax2kRjUTU/+ijU1cn6PFwwTq/XYVbeEE5D8z0n2w6 kSROm2tzv4usZ7jXf7Lj/+6Cdim2v2ZCxVm2g9BMn3coBs0tsXozBLO+6an4= 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:2002:b0:659:9a49:8f4c with SMTP id 006d021491bc7-66d3262b65dmr5801214eaf.17.1770731296253; Tue, 10 Feb 2026 05:48:16 -0800 (PST) Date: Tue, 10 Feb 2026 05:48:16 -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: <698b3720.a70a0220.2c38d7.006e.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 upstream 3a8660878839faadb4f1a6dd72c3179c1df56787 Signed-off-by: Prithvi Tambewagh --- drivers/target/target_core_configfs.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_= core_configfs.c index b19acd662726..77742175a3e5 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -108,8 +108,8 @@ 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; ssize_t r =3D -EINVAL; + struct path path =3D {0}; =20 mutex_lock(&target_devices_lock); if (target_devices) { @@ -131,17 +131,14 @@ 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); + if (r =3D=3D -ENOTDIR) + pr_err("db_root: not a directory: %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