get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225234,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225234/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420165539.85174-3-ja@ssi.bg/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260420165539.85174-3-ja@ssi.bg>",
    "date": "2026-04-20T16:55:38",
    "name": "[PATCHv2,net,2/3] ipvs: fix races around the conn_lfactor and svc_lfactor sysctl vars",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6c6d3e1c2aa9f7ba3aef54368828b03d5bdac1fb",
    "submitter": {
        "id": 2825,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/2825/?format=api",
        "name": "Julian Anastasov",
        "email": "ja@ssi.bg"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420165539.85174-3-ja@ssi.bg/mbox/",
    "series": [
        {
            "id": 500642,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500642/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500642",
            "date": "2026-04-20T16:55:36",
            "name": "IPVS: fixes after the new hash tables",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500642/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225234/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225234/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-12068-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=ssi.bg header.i=@ssi.bg header.a=rsa-sha256\n header.s=ssi header.b=DOcYey31;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12068-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=\"DOcYey31\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=193.238.174.39",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=ssi.bg"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4fzsDV1q9yz1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 03:00:10 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 3ED293008329\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 16:59:13 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id ADCFE379973;\n\tMon, 20 Apr 2026 16:59:12 +0000 (UTC)",
            "from mx.ssi.bg (mx.ssi.bg [193.238.174.39])\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 000A737996B;\n\tMon, 20 Apr 2026 16:59:08 +0000 (UTC)",
            "from mx.ssi.bg (localhost [127.0.0.1])\n\tby mx.ssi.bg (Potsfix) with ESMTP id 52FD621108;\n\tMon, 20 Apr 2026 19:59:06 +0300 (EEST)",
            "from box.ssi.bg (box.ssi.bg [193.238.174.46])\n\tby mx.ssi.bg (Potsfix) with ESMTPS;\n\tMon, 20 Apr 2026 19:59:05 +0300 (EEST)",
            "from ja.ssi.bg (unknown [213.16.62.126])\n\tby box.ssi.bg (Potsfix) with ESMTPSA id E3CF6601B7;\n\tMon, 20 Apr 2026 19:59:04 +0300 (EEST)",
            "from ja.home.ssi.bg (localhost.localdomain [127.0.0.1])\n\tby ja.ssi.bg (8.18.1/8.18.1) with ESMTP id 63KGu4hv085560;\n\tMon, 20 Apr 2026 19:56:04 +0300",
            "(from root@localhost)\n\tby ja.home.ssi.bg (8.18.1/8.18.1/Submit) id 63KGu4RX085559;\n\tMon, 20 Apr 2026 19:56:04 +0300"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776704351; cv=none;\n b=X88vcaeaF4JbbFCyzVN/4tju23JWptWvuRAN/OUO/Ezq2dDNTVDNrxpNxQWaccRojAUGNqMTS9gy5vlsHgwkzjvnjrjqMxQUXZEsw49MxbcCO4NSUnh1jMvBjYGIaJrGutXd4iJJUL3W70FsayiY5yxeyOtkLWDKFziztD5epgQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776704351; c=relaxed/simple;\n\tbh=QqMJ8APZXAv/jThgzkl48ZDqf4rg3RNwu38GuypsDSw=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=lzJ8vtTuHmLdN1sAs8rq1RZKBigfBbi2z5boqGWfOEANjLcS9aOCL/J98rekqqw0FavQtIviZgpiGRYqEpycNsJumH3PHEI9aUsGta8rZlqRLKCe0a1Y+WZ8rpMtezNM6LTnBOJZL/l1QrrCC9YhBfG6/hknPHoeNtVLXqo0yyU=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg;\n spf=pass smtp.mailfrom=ssi.bg;\n dkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=DOcYey31;\n arc=none smtp.client-ip=193.238.174.39",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ssi.bg; h=cc:cc\n\t:content-transfer-encoding:date:from:from:in-reply-to:message-id\n\t:mime-version:references:reply-to:subject:subject:to:to; s=ssi;\n\t bh=HWSPzETrY78Q6YnxMY7oGENlOhhIgC8vQ9vEXd3xBuI=; b=DOcYey31egKm\n\tFo2I/xj2N5U3ACSTdvp5kT9x91rRfmnzfCYOItg1TNqK6iVhZwtgVlDp1ao3Uh3C\n\tzmHuK3Hn39ncGpUOBrH81/yXONENnW0LGdsN6/whBIsYruI8x1wP9qB5xE2JlcQR\n\tq0tUyZU7AUGLqFDW+ck0iGvd/96QB2KVDFc6bBBw659BeRGVVVlnxy5g3x76vsoS\n\t1IyfUGVSfnUq0KqfqMWPFldCeMj+7PqBEUuDcBE/CDDHfjhpKUFxWzmXeABM1PHR\n\tr5YdQeSIndOTsgvgi/4P3MGIEbpP52i9arxuKJb163Ajv9gUbxBWuMXLBrNUYX7+\n\tSRZhxu9BMQFASHRZXxdu3VfovIoiaeKiT2I3Zc4LQI0i/UvgTSWC44EVypq39XVA\n\tEfUsBrvAvXYyWAmUbeuPqYzvVZ3oovmGuZ18YzmPoZNJCExW4k++9gUFKySmonhP\n\trRR3HyThsQ256H8GBq8SCsDkS6UfXb0mZaQk1bG49wvb38VUbSIeDsrbKVTbj+vI\n\tz+dZcReURq4rFLQ8dLeaODzSZyMqM22nxdukKPteBll4i/tnIDTC2ol6tsAOmfWb\n\t4i9+q94QyO/FfnEME1oyz7To8xKL0HDDKCXLgbUYG6HR4b7nfnYO7iD0ejHXxOr0\n\t7P6snHGGJSNTtXVGYIgP4AmlmPltv2w=",
        "From": "Julian Anastasov <ja@ssi.bg>",
        "To": "Simon Horman <horms@verge.net.au>",
        "Cc": "Pablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>,\n        lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org",
        "Subject": "[PATCHv2 net 2/3] ipvs: fix races around the conn_lfactor and\n svc_lfactor sysctl vars",
        "Date": "Mon, 20 Apr 2026 19:55:38 +0300",
        "Message-ID": "<20260420165539.85174-3-ja@ssi.bg>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260420165539.85174-1-ja@ssi.bg>",
        "References": "<20260420165539.85174-1-ja@ssi.bg>",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Sashiko warns that the new sysctls vars can be changed\nafter the hash tables are destroyed and their respective\nresizing works canceled, leading to mod_delayed_work()\nbeing called for canceled works.\n\nSolve this in different ways. conn_tab can be present even\nwithout services and is destroyed only on netns exit, so use\ndisable_delayed_work_sync() to disable the work instead of\nadding more synchronization mechanisms.\n\nAs for the svc_table, it is destroyed when the services\nare deleted, so we must be sure that netns exit is not\ncalled yet (the check for 'enable') and the work is\nnot canceled by checking all under same mutex lock.\n\nAlso, use WRITE_ONCE when updating the sysctl vars as we\nalready read them with READ_ONCE.\n\nLink: https://sashiko.dev/#/patchset/20260410112352.23599-1-fw%40strlen.de\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\n---\n net/netfilter/ipvs/ip_vs_conn.c |  2 +-\n net/netfilter/ipvs/ip_vs_ctl.c  | 12 +++++++++---\n 2 files changed, 10 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c\nindex 2082bfb2d93c..84a4921a7865 100644\n--- a/net/netfilter/ipvs/ip_vs_conn.c\n+++ b/net/netfilter/ipvs/ip_vs_conn.c\n@@ -1835,7 +1835,7 @@ static void ip_vs_conn_flush(struct netns_ipvs *ipvs)\n \n \tif (!rcu_dereference_protected(ipvs->conn_tab, 1))\n \t\treturn;\n-\tcancel_delayed_work_sync(&ipvs->conn_resize_work);\n+\tdisable_delayed_work_sync(&ipvs->conn_resize_work);\n \tif (!atomic_read(&ipvs->conn_count))\n \t\tgoto unreg;\n \ndiff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c\nindex 27e50afe9a54..caec516856e9 100644\n--- a/net/netfilter/ipvs/ip_vs_ctl.c\n+++ b/net/netfilter/ipvs/ip_vs_ctl.c\n@@ -2469,7 +2469,7 @@ static int ipvs_proc_conn_lfactor(const struct ctl_table *table, int write,\n \t\tif (val < -8 || val > 8) {\n \t\t\tret = -EINVAL;\n \t\t} else {\n-\t\t\t*valp = val;\n+\t\t\tWRITE_ONCE(*valp, val);\n \t\t\tif (rcu_access_pointer(ipvs->conn_tab))\n \t\t\t\tmod_delayed_work(system_unbound_wq,\n \t\t\t\t\t\t &ipvs->conn_resize_work, 0);\n@@ -2496,10 +2496,16 @@ static int ipvs_proc_svc_lfactor(const struct ctl_table *table, int write,\n \t\tif (val < -8 || val > 8) {\n \t\t\tret = -EINVAL;\n \t\t} else {\n-\t\t\t*valp = val;\n-\t\t\tif (rcu_access_pointer(ipvs->svc_table))\n+\t\t\tmutex_lock(&ipvs->service_mutex);\n+\t\t\tWRITE_ONCE(*valp, val);\n+\t\t\t/* Make sure the services are present */\n+\t\t\tif (rcu_access_pointer(ipvs->svc_table) &&\n+\t\t\t    READ_ONCE(ipvs->enable) &&\n+\t\t\t    !test_bit(IP_VS_WORK_SVC_NORESIZE,\n+\t\t\t\t      &ipvs->work_flags))\n \t\t\t\tmod_delayed_work(system_unbound_wq,\n \t\t\t\t\t\t &ipvs->svc_resize_work, 0);\n+\t\t\tmutex_unlock(&ipvs->service_mutex);\n \t\t}\n \t}\n \treturn ret;\n",
    "prefixes": [
        "PATCHv2",
        "net",
        "2/3"
    ]
}