Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196534/?format=api
{ "id": 2196534, "url": "http://patchwork.ozlabs.org/api/patches/2196534/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260214154515.1229565-1-pchelkin@ispras.ru/", "project": { "id": 12, "url": "http://patchwork.ozlabs.org/api/projects/12/?format=api", "name": "Linux CIFS Client", "link_name": "linux-cifs-client", "list_id": "linux-cifs.vger.kernel.org", "list_email": "linux-cifs@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260214154515.1229565-1-pchelkin@ispras.ru>", "list_archive_url": null, "date": "2026-02-14T15:45:14", "name": "ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9a0bb2507752ec627c3a418ae15614f46006e2aa", "submitter": { "id": 85720, "url": "http://patchwork.ozlabs.org/api/people/85720/?format=api", "name": "Fedor Pchelkin", "email": "pchelkin@ispras.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260214154515.1229565-1-pchelkin@ispras.ru/mbox/", "series": [ { "id": 492182, "url": "http://patchwork.ozlabs.org/api/series/492182/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=492182", "date": "2026-02-14T15:45:14", "name": "ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492182/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196534/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196534/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-cifs+bounces-9379-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-cifs@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=ispras.ru header.i=@ispras.ru header.a=rsa-sha256\n header.s=default header.b=mv2f3Fj4;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-9379-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru\n header.b=\"mv2f3Fj4\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=83.149.199.84", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=ispras.ru", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=ispras.ru" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCtfh2wDFz1xr1\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 02:45:48 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 5E4763018D56\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 15:45:46 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 15B282765D7;\n\tSat, 14 Feb 2026 15:45:45 +0000 (UTC)", "from mail.ispras.ru (mail.ispras.ru [83.149.199.84])\n\t(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 484101DFF7;\n\tSat, 14 Feb 2026 15:45:41 +0000 (UTC)", "from debian.lan (unknown [104.28.230.246])\n\tby mail.ispras.ru (Postfix) with ESMTPSA id B6F56406C740;\n\tSat, 14 Feb 2026 15:45:33 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771083945; cv=none;\n b=gZ03702w73NMGFeQ9RB2y1TEQd12CwU5jsEnNAh6T0FfXY165V2P/Cgmcu/QrCuG2FwzNEUW/zwA4QtLkzAJTFVyEOUuZXJZGUYrqFZrESjxGhQkn9uf1+MV3IFNdzbYX565m28c0e7CRn2Dp8zHQiv1otI4R+Remyt1EYNg3mU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771083945; c=relaxed/simple;\n\tbh=2b/Hz7E/hS5O1BPXPF/6BmcIdM80RX59SIW0Jgmtuqs=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=Ln5UDrhZ6pB+rOqTKkFBIr2nYWHSfQkD/b73YcYEoXPY++5w02vZliz5pYDXUu3YIDvcX40oFCy6CgbvtfgP6yhB4dfDjOMvMntg/noGSC0vcdVIvK3JV9pG1zTBFrXWPrJ1uaPjtaLsZWjxTbVrYccMJDugorDIGDdnfQsd3ZE=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=ispras.ru;\n spf=pass smtp.mailfrom=ispras.ru;\n dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru\n header.b=mv2f3Fj4; arc=none smtp.client-ip=83.149.199.84", "DKIM-Filter": "OpenDKIM Filter v2.11.0 mail.ispras.ru B6F56406C740", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru;\n\ts=default; t=1771083934;\n\tbh=oTfkgZXpjapkYtjWtm270jN3Ycp4DQI4x3V+ugTHea8=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=mv2f3Fj46VPIZWHd8f6zo+6m8q8FsHAiojEklclq9MlEeTmnAfY8889uGbTAJnKfg\n\t 6faZYPMahC8PrKiGmQ1mGdcuGGgpzT9a8ZNmZDKEkgXqVU44v6lhGUsv0y2qpcWeUq\n\t 5IJgwxHFhsnunKkxXWQDQpbDplTLWxgtRct77UrI=", "From": "Fedor Pchelkin <pchelkin@ispras.ru>", "To": "Namjae Jeon <linkinjeon@kernel.org>,\n\tSteve French <smfrench@gmail.com>,\n\tNeilBrown <neil@brown.name>", "Cc": "Fedor Pchelkin <pchelkin@ispras.ru>,\n\tSergey Senozhatsky <senozhatsky@chromium.org>,\n\tTom Talpey <tom@talpey.com>,\n\tlinux-cifs@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlvc-project@linuxtesting.org,\n\tstable@vger.kernel.org", "Subject": "[PATCH] ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error\n paths", "Date": "Sat, 14 Feb 2026 18:45:14 +0300", "Message-ID": "<20260214154515.1229565-1-pchelkin@ispras.ru>", "X-Mailer": "git-send-email 2.51.0", "Precedence": "bulk", "X-Mailing-List": "linux-cifs@vger.kernel.org", "List-Id": "<linux-cifs.vger.kernel.org>", "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "There are two places where ksmbd_vfs_kern_path_end_removing() needs to be\ncalled in order to balance what the corresponding successful call to\nksmbd_vfs_kern_path_start_removing() has done, i.e. drop inode locks and\nput the taken references. Otherwise there might be potential deadlocks\nand unbalanced locks which are caught like:\n\nBUG: workqueue leaked lock or atomic: kworker/5:21/0x00000000/7596\n last function: handle_ksmbd_work\n2 locks held by kworker/5:21/7596:\n #0: ffff8881051ae448 (sb_writers#3){.+.+}-{0:0}, at: ksmbd_vfs_kern_path_locked+0x142/0x660\n #1: ffff888130e966c0 (&type->i_mutex_dir_key#3/1){+.+.}-{4:4}, at: ksmbd_vfs_kern_path_locked+0x17d/0x660\nCPU: 5 PID: 7596 Comm: kworker/5:21 Not tainted 6.1.162-00456-gc29b353f383b #138\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014\nWorkqueue: ksmbd-io handle_ksmbd_work\nCall Trace:\n <TASK>\n dump_stack_lvl+0x44/0x5b\n process_one_work.cold+0x57/0x5c\n worker_thread+0x82/0x600\n kthread+0x153/0x190\n ret_from_fork+0x22/0x30\n </TASK>\n\nFound by Linux Verification Center (linuxtesting.org).\n\nFixes: d5fc1400a34b (\"smb/server: avoid deadlock when linking with ReplaceIfExists\")\nCc: stable@vger.kernel.org\nSigned-off-by: Fedor Pchelkin <pchelkin@ispras.ru>\n---\n fs/smb/server/smb2pdu.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c\nindex cbb31efdbaa2..2782eea214d0 100644\n--- a/fs/smb/server/smb2pdu.c\n+++ b/fs/smb/server/smb2pdu.c\n@@ -6115,14 +6115,14 @@ static int smb2_create_link(struct ksmbd_work *work,\n \t\t\t\trc = -EINVAL;\n \t\t\t\tksmbd_debug(SMB, \"cannot delete %s\\n\",\n \t\t\t\t\t link_name);\n-\t\t\t\tgoto out;\n \t\t\t}\n \t\t} else {\n \t\t\trc = -EEXIST;\n \t\t\tksmbd_debug(SMB, \"link already exists\\n\");\n-\t\t\tgoto out;\n \t\t}\n \t\tksmbd_vfs_kern_path_end_removing(&path);\n+\t\tif (rc)\n+\t\t\tgoto out;\n \t}\n \trc = ksmbd_vfs_link(work, target_name, link_name);\n \tif (rc)\n", "prefixes": [] }