get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2225711/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2225711,
    "url": "http://patchwork.ozlabs.org/api/patches/2225711/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260421132612.38517-1-kovalev@altlinux.org/",
    "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": "<20260421132612.38517-1-kovalev@altlinux.org>",
    "list_archive_url": null,
    "date": "2026-04-21T13:26:12",
    "name": "[5.10.y] cifs: Fix connections leak when tlink setup failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "508bec94d159d91f442069e3e7e6049fc31c2ea6",
    "submitter": {
        "id": 86433,
        "url": "http://patchwork.ozlabs.org/api/people/86433/?format=api",
        "name": "Vasiliy Kovalev",
        "email": "kovalev@altlinux.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260421132612.38517-1-kovalev@altlinux.org/mbox/",
    "series": [
        {
            "id": 500803,
            "url": "http://patchwork.ozlabs.org/api/series/500803/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=500803",
            "date": "2026-04-21T13:26:12",
            "name": "[5.10.y] cifs: Fix connections leak when tlink setup failed",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500803/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225711/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225711/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10985-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 spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10985-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=193.43.8.18",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=altlinux.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=altlinux.org"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0NV607LQz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 23:28:45 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 63567305A44E\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 13:26:19 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D54B01F5858;\n\tTue, 21 Apr 2026 13:26:16 +0000 (UTC)",
            "from air.basealt.ru (air.basealt.ru [193.43.8.18])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EBDA19004A;\n\tTue, 21 Apr 2026 13:26:15 +0000 (UTC)",
            "from altlinux.ipa.basealt.ru (unknown [193.43.11.2])\n\t(Authenticated sender: kovalevvv)\n\tby air.basealt.ru (Postfix) with ESMTPSA id 2E1C82338F;\n\tTue, 21 Apr 2026 16:26:13 +0300 (MSK)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776777976; cv=none;\n b=tXsIhDX56PsIsgcrFRZq4bE8i1LJt63e7VQhHFZZVm5FnXI/Fk/Isz+TFdbaccepd5AXi6MS9B6ex7+vMcY1Nm4s09Hvx06g9M5xx3LE7iLI0qL+SYsFZDS+fSA83ejQIztiK73PXKF7hSHkzL9PTppFJUnTuP6bf1oeZYB7RW4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776777976; c=relaxed/simple;\n\tbh=oYn8wqJFenAgTBU6zT0gfzUkCUtPMUGM8nu/rQnPnV0=;\n\th=From:To:Cc:Subject:Date:Message-Id:MIME-Version;\n b=pns8ZbxvCQAzEWP8tLiDz69kBQNS+iw3u5FPnOsLDMim79KVxQhAVzA5ZGG+OLt3z82qjfYJ2ITfllPvUxOgYsYJgndfzuCu5FTPjFXv6Nwi6JpOu0X1YlXD4eew3XKWTRMJC7zfqtRQ19Iow1hftaDm7g+g8/7JeJrq7JES0HU=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=altlinux.org;\n spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=193.43.8.18",
        "From": "Vasiliy Kovalev <kovalev@altlinux.org>",
        "To": "stable@vger.kernel.org",
        "Cc": "Steve French <sfrench@samba.org>,\n\tlinux-cifs@vger.kernel.org,\n\tsamba-technical@lists.samba.org,\n\tlvc-project@linuxtesting.org,\n\tkovalev@altlinux.org",
        "Subject": "[PATCH 5.10.y] cifs: Fix connections leak when tlink setup failed",
        "Date": "Tue, 21 Apr 2026 16:26:12 +0300",
        "Message-Id": "<20260421132612.38517-1-kovalev@altlinux.org>",
        "X-Mailer": "git-send-email 2.33.8",
        "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": "From: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>\n\ncommit 1dcdf5f5b2137185cbdd5385f29949ab3da4f00c upstream.\n\nIf the tlink setup failed, lost to put the connections, then\nthe module refcnt leak since the cifsd kthread not exit.\n\nAlso leak the fscache info, and for next mount with fsc, it will\nprint the follow errors:\n  CIFS: Cache volume key already in use (cifs,127.0.0.1:445,TEST)\n\nLet's check the result of tlink setup, and do some cleanup.\n\nFixes: 56c762eb9bee (\"cifs: Refactor out cifs_mount()\")\nReviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>\nSigned-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>\nSigned-off-by: Steve French <stfrench@microsoft.com>\n[ kovalev: bp to fix CVE-2022-49822; adapted to use direct xid/ses/tcon\n  variables instead of mnt_ctx struct fields due to the older kernel not\n  having the corresponding cifs_mount() refactoring (see upstream commit\n  c88f7dcd6d64) ]\nSigned-off-by: Vasiliy Kovalev <kovalev@altlinux.org>\n---\n fs/cifs/connect.c | 15 +++++++++++----\n 1 file changed, 11 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c\nindex 769c7759601d..3161155fd069 100644\n--- a/fs/cifs/connect.c\n+++ b/fs/cifs/connect.c\n@@ -4786,9 +4786,13 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)\n \tvol->prepath = NULL;\n \n out:\n-\tfree_xid(xid);\n \tcifs_try_adding_channels(ses);\n-\treturn mount_setup_tlink(cifs_sb, ses, tcon);\n+\trc = mount_setup_tlink(cifs_sb, ses, tcon);\n+\tif (rc)\n+\t\tgoto error;\n+\n+\tfree_xid(xid);\n+\treturn rc;\n \n error:\n \tkfree(ref_path);\n@@ -4820,9 +4824,12 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)\n \t\t\tgoto error;\n \t}\n \n-\tfree_xid(xid);\n+\trc = mount_setup_tlink(cifs_sb, ses, tcon);\n+\tif (rc)\n+\t\tgoto error;\n \n-\treturn mount_setup_tlink(cifs_sb, ses, tcon);\n+\tfree_xid(xid);\n+\treturn rc;\n \n error:\n \tmount_put_conns(cifs_sb, xid, server, ses, tcon);\n",
    "prefixes": [
        "5.10.y"
    ]
}