From nobody Thu Apr 2 09:33:38 2026 Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.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 E89D47261C for ; Mon, 16 Feb 2026 05:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771219103; cv=none; b=hSGq6QMdLeqMm4fBDX6LTS6Qq2N4ZKpTQKA8m0V7e3fN4Wdk1qXv4/YCa0zAst5eWo6eUD5eDVbbXdjlLP6MkelK6T6mEX3p4UuQPbuQouZdeFrMetqXpc3031dXGqRtEqxQfCh6T55idocfkQ2PTTmuxxrCMMuPhipg26Fkzlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771219103; c=relaxed/simple; bh=J4rOxjR5SxLiUe8YpU/JYTE2oN5/JJPxsKl5gvgwS6I=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=DR3KAYzpl3xEzY0Oaa02f90Ya3jVSAhfc0czNFOSR32sK07i2lgPPsYvnp5x9tGFI/OzyQZENtG9HuCeS4dl0ZEf3MDGDXXK+GxXBF78EW3XwlKPFHxtl1HG4Q+iwnloXeoQo7/UfVYgcEW3OwlkDtsFADIAuffDQimarl0gxTM= 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.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-oo1-f72.google.com with SMTP id 006d021491bc7-6795b040562so5613030eaf.2 for ; Sun, 15 Feb 2026 21:18:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771219101; x=1771823901; 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=cQeUsyDZpzOBwXWyGhFFWbqGvczQCsyiTCiPxw5AO9o=; b=Lhf5U8kkQexnOvgEpACWHYa7WfPLwSzomev+8SdyvXfXHbBpcJ6k3oJL/pwIG2+McP /od3zIDLpfzkK4ZL2ynIaBu02jOE7ctGFTw1cHlaRxKYNxiPWiv78JKeUWUs+Ucl9JR9 8ecG2OgM4oskmWgckW8YP4x7XisYwj4dDaa+c0D3FIoYQJrqzuusCWEspf6lYKsviWLD otmX9W2L923CuAn4oRwlhY8XNh3z4DsnzgBtWVVZo2vf3JrIFrzPPsVIgdiW1jE1dwGe IqitJxp39puG96i6UfzimOhoqPnE0nMQCSFQRoKWVe97EardXlICycrJjsDSaxUzQyaF 033g== X-Gm-Message-State: AOJu0Yw7MnKQ8+C/DYPMacrCLExeJ8vgSbiRli5W8O+f1PFcdLbORXeN +V8U+i8WgOZoykJoqJe3yj+xWV/ngxcjQE9QmvuevNsEiB7q9tKsxyMGeaeVVE7WkmF26JijfaY KonAo6PBwHIDUn5/90PDRdmtxUjBnVOH5lko04S/V2GnrvRb31S7OvG81lAU= 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:180e:b0:663:a6e:49a1 with SMTP id 006d021491bc7-67766ad5dfcmr4019913eaf.14.1771219100890; Sun, 15 Feb 2026 21:18:20 -0800 (PST) Date: Sun, 15 Feb 2026 21:18:20 -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: <6992a89c.a70a0220.2c38d7.00e5.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 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..f94c242eff97 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 {}; =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