get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231739,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231739/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260501110246.50647-3-tristmd@gmail.com/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260501110246.50647-3-tristmd@gmail.com>",
    "date": "2026-05-01T11:02:46",
    "name": "[3/3] jffs2: fix GC thread BUG_ON during reconfigure via fspick",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "84d3d7cbd840961ff77e5335b552f04164db7919",
    "submitter": {
        "id": 93179,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/93179/?format=api",
        "name": "Tristan Madani",
        "email": "tristmd@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260501110246.50647-3-tristmd@gmail.com/mbox/",
    "series": [
        {
            "id": 502440,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502440/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=502440",
            "date": "2026-05-01T11:02:45",
            "name": "[1/3] jffs2: always stop garbage collection thread on unmount",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502440/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231739/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231739/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=xYXWNluj;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=tOvRUUW6;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4g6SnX5WBWz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 21:03:09 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wIle1-00000006bjn-3N3h;\n\tFri, 01 May 2026 11:02:53 +0000",
            "from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wIldz-00000006biM-1qip\n\tfor linux-mtd@lists.infradead.org;\n\tFri, 01 May 2026 11:02:53 +0000",
            "by mail-wm1-x32a.google.com with SMTP id\n 5b1f17b1804b1-48a563e4ef7so17630495e9.0\n        for <linux-mtd@lists.infradead.org>;\n Fri, 01 May 2026 04:02:50 -0700 (PDT)",
            "from debian.. ([2001:41d0:303:db6b::])\n        by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48a8eb3427fsm79491905e9.0.2026.05.01.04.02.48\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 01 May 2026 04:02:49 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=dvtfmH56HKJq2pPtCIIfwtB6OBVhtlo3h8CqQGF+5zk=; b=xYXWNlujyn4Ufi\n\t1JYpCfgRD3WYYuWl9FNnz5GL/ajC2bFh9tc+zLrKsHw6cdXS2XtZNPH5btlV6ENo9ygIPZpVkU2d2\n\trupPTxUGGZ009vIp0zlnAQNwWHh1UPilc8MciR7zOX9qFygImOV8FvDMGIZD9p3dvH6+3fcnQpWXL\n\tw5fOOQ8jqkCIaApYMHIwIlILKyeQ3VcQgqIhtoftXtWID2u2QLornYMOWk8cIPOBCkkVLQSN0qKkx\n\t8iZAGS7C+PJ96+dgQewDzmoP1K++5ZZKLoExvrBUOfzI7h27bLyKVT0NN33u9WljWlPUg1s0TjVuZ\n\tYbMS/1fjLMJ3+O/YYP6Q==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1777633370; x=1778238170;\n darn=lists.infradead.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=q+0lxbCgi4fdg+cPkHoOKKRDCXmHxPZDe6bIN/WeBEA=;\n        b=tOvRUUW6SnLqZnvWeMmEtOnnYJqzEtmTHhIB9JU/ISgY4Aut2sqF0creiOfl7wyOgy\n         aQWmR30G6HXBUICl5tKObxU8ASs82LNli/gKiE/dWIUf2uCYMEk8BIOzhBlJ5gKfl0fX\n         ld+4HDO7k2BGjkfNKpGh7652c3e215aV4cIbhsp+4EOF6tGINPvHDDhK0lHFYjxMVWAr\n         R1+Ikubt5Gd+VBX1/wGVTUL8aCzV87qJJx/7AuKG7aECb6mwn2tt9fQItUPHihHGCenr\n         vX/PVhid1VBMe0tQnoT6RgnW+pCcR2zf2wN2CLZh2TGEpVz9anBPmXsydyYpQgokVpjB\n         omCA=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1777633370; x=1778238170;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=q+0lxbCgi4fdg+cPkHoOKKRDCXmHxPZDe6bIN/WeBEA=;\n        b=QE0eQNvL9mYMqdtyv5Nt7hfezO7FSMZkcdLX0EgVIquw9BzHamEGfJmtZSxZHj1nB8\n         FlkGm9b0V2taekOYae9QIf3s0thisQA+Bd3aSJUwHfkUs6h3d7+dZRbJ7n6rdd0HA1zA\n         0S5J4CjryU9kwdHNZTdkDXiZd6KRX/GvLg0QyTzzhATXw+gzalH2zkpGxrPZNc1mXszy\n         h/rdiEKgqPRgeq8+D9CXWXPWyqSiy+W5lhAcEU1SNXGMHuFsQBvJ4UIWuyuqwLnoWsPQ\n         HCGiDTPX8daX8Ok9p9owEaYpr+Og+t00FNc7VS1pCm2WS4o7UTKdCVsAxvBsjjXc7jJK\n         6hYA==",
        "X-Gm-Message-State": "AOJu0YwwIl3aUCxVLKWZLtxlme7fkGs5smTDI8FYAoUuzW85mnsImxOT\n\ttNDPayCdYncwYD1Vp/+iRzm5xugqWLAFC5hu5n+9eobgkHnizsRD6Pg=",
        "X-Gm-Gg": "AeBDieuu1aLx7h06gnOh54/blcX0yy7RCwxR27f25bCTREKUEO3dRoqwr5Gv+vPIdz+\n\tL79k7EHy7Wqn3d/QeB98mFDEmHwuac6/bsNMUd1XLIeDrzxleGWq0kUeok4AJYqbmT1gqx3mJuy\n\tHLt2Jz7HHxEnCTF0k+iE6KqufYKsh2MWH50kAPLNIUjSSJrFGP/4Bur35oNBTOvWWKcC4BAFZ8J\n\tCNWTJaB5crQ6Tk3HPTI38Y+wuWb5aq5LuMb4DX6FbGhECL3YBpELV/vOmno4VrVY+Wp4JqOQYfU\n\ttFDw92RZQhQYnhYsOu/JMBjQL1wTHV3LF5aDv1rC9nRhw2ebK01Y3t8Iurwb5md3yrNQpNbXXMf\n\tSkEQAgNyCxBAoYY0d9p1YMz/Bk/zJNusPWp2L7pJIO6D3sU7YHE+be+0hOu+tpmdV4Q225qgASg\n\tSjplpBQlnESfWzag==",
        "X-Received": "by 2002:a05:600c:8710:b0:48a:581c:ead with SMTP id\n 5b1f17b1804b1-48a844448f9mr115645805e9.10.1777633369516;\n        Fri, 01 May 2026 04:02:49 -0700 (PDT)",
        "From": "Tristan Madani <tristmd@gmail.com>",
        "To": "David Woodhouse <dwmw2@infradead.org>,\n\tRichard Weinberger <richard@nod.at>",
        "Cc": "linux-mtd@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org,\n\tstable@vger.kernel.org,\n\tTristan Madani <tristan@talencesecurity.com>,\n\tsyzbot+61a9d95630970eece39d@syzkaller.appspotmail.com",
        "Subject": "[PATCH 3/3] jffs2: fix GC thread BUG_ON during reconfigure via fspick",
        "Date": "Fri,  1 May 2026 11:02:46 +0000",
        "Message-ID": "<20260501110246.50647-3-tristmd@gmail.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260501110246.50647-1-tristmd@gmail.com>",
        "References": "<20260501110246.50647-1-tristmd@gmail.com>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260501_040251_494505_95A43783 ",
        "X-CRM114-Status": "GOOD (  16.91  )",
        "X-Spam-Score": "-2.1 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: Tristan Madani jffs2_do_remount_fs() uses\n fc->sb_flags\n    to decide whether to start the garbage collection thread. However,\n when called\n    via fspick(2) followed by fsconfig(FSCONFIG_CMD_RECONFIGURE), fc->sb_flags\n    does n [...]\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2a00:1450:4864:20:0:0:0:32a listed in]\n                             [list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [tristmd(at)gmail.com]",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Tristan Madani <tristan@talencesecurity.com>\n\njffs2_do_remount_fs() uses fc->sb_flags to decide whether to start\nthe garbage collection thread.  However, when called via fspick(2)\nfollowed by fsconfig(FSCONFIG_CMD_RECONFIGURE), fc->sb_flags does\nnot reflect the current mount state -- it only contains flags being\nexplicitly changed (as indicated by fc->sb_flags_mask).\n\nWhen fspick() is called with flags=0 on a read-only mount,\nfc->sb_flags has SB_RDONLY clear (since SB_RDONLY is not in\nsb_flags_mask).  This causes jffs2_start_garbage_collect_thread()\nto be called even though the filesystem remains read-only.  On the\nsecond reconfigure, BUG_ON(c->gc_task) fires because the thread\nfrom the first call is still running.\n\nFix this by computing the effective read-only state using both\nfc->sb_flags and fc->sb_flags_mask.  Also unconditionally call\njffs2_stop_garbage_collect_thread() before potentially restarting\nit, which is safe when gc_task is NULL and prevents the BUG_ON.\n\nReported-by: syzbot+61a9d95630970eece39d@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid=61a9d95630970eece39d\nTested-by: syzbot+61a9d95630970eece39d@syzkaller.appspotmail.com\nFixes: ec10a24f10c8f (\"vfs: Convert jffs2 to use the new mount API\")\nCc: stable@vger.kernel.org\nSigned-off-by: Tristan Madani <tristan@talencesecurity.com>\n---\n fs/jffs2/fs.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c\nindex 6ada8369a7622..33574312b7abe 100644\n--- a/fs/jffs2/fs.c\n+++ b/fs/jffs2/fs.c\n@@ -396,28 +396,28 @@ void jffs2_dirty_inode(struct inode *inode, int flags)\n int jffs2_do_remount_fs(struct super_block *sb, struct fs_context *fc)\n {\n \tstruct jffs2_sb_info *c = JFFS2_SB_INFO(sb);\n+\tbool new_ro;\n \n \tif (c->flags & JFFS2_SB_FLAG_RO && !sb_rdonly(sb))\n \t\treturn -EROFS;\n \n-\t/* We stop if it was running, then restart if it needs to.\n-\t   This also catches the case where it was stopped and this\n-\t   is just a remount to restart it.\n-\t   Flush the writebuffer, if necessary, else we loose it */\n+\tnew_ro = (fc->sb_flags_mask & SB_RDONLY) ?\n+\t\t (fc->sb_flags & SB_RDONLY) : sb_rdonly(sb);\n+\n+\tjffs2_stop_garbage_collect_thread(c);\n+\n \tif (!sb_rdonly(sb)) {\n-\t\tjffs2_stop_garbage_collect_thread(c);\n \t\tmutex_lock(&c->alloc_sem);\n \t\tjffs2_flush_wbuf_pad(c);\n \t\tmutex_unlock(&c->alloc_sem);\n \t}\n \n-\tif (!(fc->sb_flags & SB_RDONLY))\n+\tif (!new_ro)\n \t\tjffs2_start_garbage_collect_thread(c);\n \n \tfc->sb_flags |= SB_NOATIME;\n \treturn 0;\n }\n-\n /* jffs2_new_inode: allocate a new inode and inocache, add it to the hash,\n    fill in the raw_inode while you're at it. */\n struct inode *jffs2_new_inode (struct inode *dir_i, umode_t mode, struct jffs2_raw_inode *ri)\n",
    "prefixes": [
        "3/3"
    ]
}