Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229608/?format=api
{ "id": 2229608, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229608/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260428133816.922544-1-charsyam@gmail.com/", "project": { "id": 12, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260428133816.922544-1-charsyam@gmail.com>", "date": "2026-04-28T13:38:16", "name": "ksmbd: stop transports before procfs cleanup during shutdown", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "db703257d77a7b5b37c3fca85a81c7ce6fd52151", "submitter": { "id": 93166, "url": "http://patchwork.ozlabs.org/api/1.1/people/93166/?format=api", "name": "CharSyam", "email": "charsyam@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260428133816.922544-1-charsyam@gmail.com/mbox/", "series": [ { "id": 501866, "url": "http://patchwork.ozlabs.org/api/1.1/series/501866/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=501866", "date": "2026-04-28T13:38:16", "name": "ksmbd: stop transports before procfs cleanup during shutdown", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501866/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229608/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229608/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-cifs+bounces-11215-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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=MxF5qKv7;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-11215-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"MxF5qKv7\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.182", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4g4jHd6D71z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 00:19:41 +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 5F0FF307172A\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 13:40:34 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7DC6023504B;\n\tTue, 28 Apr 2026 13:38:23 +0000 (UTC)", "from mail-pl1-f182.google.com (mail-pl1-f182.google.com\n [209.85.214.182])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 25FA63AD528\n\tfor <linux-cifs@vger.kernel.org>; Tue, 28 Apr 2026 13:38:21 +0000 (UTC)", "by mail-pl1-f182.google.com with SMTP id\n d9443c01a7336-2b467d03d57so8686795ad.0\n for <linux-cifs@vger.kernel.org>;\n Tue, 28 Apr 2026 06:38:21 -0700 (PDT)", "from ser8.. ([221.156.231.192])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b97ac8cf1dsm28160775ad.68.2026.04.28.06.38.19\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 06:38:20 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777383503; cv=none;\n b=mRdHYStNj0e2JVpyi/kLztuz3/7F/H2rZg4kZn9Rj/YtPjY8LeqswCLK/7clwfLzmYnoctAeSA4FGc5tiVsAj4bnPc0Uvk1xKjvaur6a0CLhVX9LSE2mR0q2Zs99n6VGT4vYK3JOROcZtppPYV1/9Wg31s/V2tDzPEal7bmnKms=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777383503; c=relaxed/simple;\n\tbh=TaYnuhceaMT+9DlGYrSPenFM1/y6sDvtTbUGtDSD1MA=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=O7SDl0XvB5QhcMdBB6fF5y8Pb5/K+18zHHPAd0A6sGvJOjx+ttwKX6AVst2Fl9vR9A6D/Tsy27QHYAV9bwv6jXlG/tAQo5nqSIJXpPhrs7STgNdOLCiKwPXEJsW5sqPokzsJ/U6x1BZp2Rp9+15uyQeN6Vrex7GhUrsNzbOs6Xw=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=MxF5qKv7; arc=none smtp.client-ip=209.85.214.182", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777383501; x=1777988301;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=r/eI/PGX1PR1IZjElSQCjfqxsz2vIUbsSINVfSZOJOY=;\n b=MxF5qKv7gjHHLncao1PE6mF+tRas02C2kzxh+xNfI0Pt4+S328GAvZLNyZIwpax7sB\n wsXJmrIlRSwwpkv2sT4mT16OevuFZI4ee/8dk8R8kfTC/oBtujDsy16cfz1HhrDb46Vj\n 5kruq2djR0LHACoqjNetvDi9dtf/wExuI9X5DS9xxRqy7A8oy7NnvAbRRyGsd28MPQa6\n fkYleNX24Efp9uBqrpdAoaLrnOv41EKl1XZemai2IWFwqaQD2uTOsVRVXa54nJkgqQO9\n fXaTzvQ9TXLeFnoxjInyl2UnoCMe3/KPuIQxyPxmCwy1iIvyW9whzw07I0nLhI4BT94D\n BQtg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777383501; x=1777988301;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=r/eI/PGX1PR1IZjElSQCjfqxsz2vIUbsSINVfSZOJOY=;\n b=IoSNM2fQBPCl95SN50Hyz2jEsUJaeQKlYS+jXO+ubK786Mh587R1a9EuSv3EK6lQgW\n MJnJWDmoPb4jgLhBYvdhwe5IkUbzxkZVf0KR48JLsUSSrXEVIb5Rl0dkfBCGoT5LS6LV\n ezZQUFz1RVlLJ99LFkNUlPnnGBMgbvewne+8z48/dv358+OEiDjI8n/6iypVuWGuGicq\n QBAMI+CS/8n+XDEqMKcQHsMmZMGO2POShaZYDu1xChWY2BbSLa4bUpBemmkpyQjECrc3\n 53g30f8igHPDEI6PcseGQyBt62bAuo5LNcK6gFfmRR7Hn89cM4hrjLPmAqT64kC4HqcY\n 1AGw==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ/bRGrREnNnmU8anZLs3iQHWdowrqspg2vPiqxZgA2lEy//pXLej/ti0bT/h2qqrk/mGoyTOagE0RBV@vger.kernel.org", "X-Gm-Message-State": "AOJu0YxxfnVZLzqqvhG5mxgA5kimbpwBL3hTvzjdFpJ2UfGTbyGYGH6B\n\tkgtUFDUJ5kxWNgGUMTK8zcya8//92eb2YlK2Jj8mckARoAz6dJLS3Oci+UgYWtSh", "X-Gm-Gg": "AeBDietkOk0oJfDH6HddzHhawKdac3SaJqXTs3r9sswtUatmk8jk2bbICrXVdukyQsJ\n\tilVVS4LPGsi2bp9iO+Ewfoe6P70aXnNI+YzSlamgwSIN/Z1H/PiqVTmxwvKax4scJ2VoDJbF/sg\n\t80WL7Rj4Wr/gDjsFpUJalqc220/aT5eB8aJK6lSkNnM2+PZC7abEGkpX38IMzV2b1EtaG3g2K68\n\tCQqoqNHxLSonR0y2i0OdmQr4hLGIkNNAfug2SFDsBDW+2nqnD2bjiuM7DAstQhNLygVY4NXCM7n\n\tbeM5p7moAUdiHrqcYbfnapcb7K4r2ujP5u3rn98PWajreyo8NcNnGiLo0UK+zsOSStbN3h/2wA2\n\tobjojflq8cjI4Xz+VCGRcodVTBq3rO+MmeP3nBVc6AlP70BRMVFGQKFUmNWD1G4pcreIsYvG2aN\n\tupEQ2T9sv7M5vBL8edqnKpQCHRuXo=", "X-Received": "by 2002:a17:903:37c4:b0:2b2:4f56:d571 with SMTP id\n d9443c01a7336-2b97a9271bbmr18507755ad.4.1777383501282;\n Tue, 28 Apr 2026 06:38:21 -0700 (PDT)", "From": "DaeMyung Kang <charsyam@gmail.com>", "To": "Namjae Jeon <linkinjeon@kernel.org>,\n\tSteve French <smfrench@gmail.com>", "Cc": "Sergey Senozhatsky <senozhatsky@chromium.org>,\n\tTom Talpey <tom@talpey.com>,\n\tHyunchul Lee <hyc.lee@gmail.com>,\n\tBahubali B Gumaji <bahubali.bg@samsung.com>,\n\tSang-Soo Lee <constant.lee@samsung.com>,\n\tlinux-cifs@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tDaeMyung Kang <charsyam@gmail.com>", "Subject": "[PATCH] ksmbd: stop transports before procfs cleanup during shutdown", "Date": "Tue, 28 Apr 2026 22:38:16 +0900", "Message-ID": "<20260428133816.922544-1-charsyam@gmail.com>", "X-Mailer": "git-send-email 2.43.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": "ksmbd_server_shutdown() removes the whole /proc/fs/ksmbd subtree via\nksmbd_proc_cleanup() before ksmbd_conn_transport_destroy() runs. The\ntransport teardown later calls delete_proc_clients(), which removes the\ncached proc_clients entry under that subtree.\n\nSince proc_remove(ksmbd_proc_fs) already removes the subtree, that later\nproc_remove(proc_clients) can operate on a freed proc_dir_entry and trip\nKASAN during rmmod:\n\n BUG: KASAN: slab-use-after-free in proc_remove\n proc_remove\n ksmbd_conn_transport_destroy\n ksmbd_server_exit\n\nKeep the control sysfs class unregistered before tearing down transports\nso kill_server cannot race a module-exit cleanup, but stop the transports\nbefore removing the root procfs subtree. That lets client and session\nproc entries be removed while their parent is still alive, then\nksmbd_proc_cleanup() can remove the remaining root entries.\n\nKASAN testing confirms the ordering issue: the pre-fix module\nreproduces the proc_remove slab-use-after-free during rmmod, while the\npatched module passes the same rmmod scenario. Active pending-IO\ntesting also passes; the observed workqueue hog warning is present on\nthe pre-fix baseline as well and is not introduced by this shutdown\nordering change.\n\nFixes: b38f99c1217a (\"ksmbd: add procfs interface for runtime monitoring and statistics\")\nSigned-off-by: DaeMyung Kang <charsyam@gmail.com>\n---\n fs/smb/server/server.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/fs/smb/server/server.c b/fs/smb/server/server.c\nindex 5d799b2d4c62..188a6a72f7fa 100644\n--- a/fs/smb/server/server.c\n+++ b/fs/smb/server/server.c\n@@ -535,11 +535,11 @@ static int ksmbd_server_shutdown(void)\n {\n \tWRITE_ONCE(server_conf.state, SERVER_STATE_SHUTTING_DOWN);\n \n-\tksmbd_proc_cleanup();\n \tclass_unregister(&ksmbd_control_class);\n+\tksmbd_conn_transport_destroy();\n+\tksmbd_proc_cleanup();\n \tksmbd_workqueue_destroy();\n \tksmbd_ipc_release();\n-\tksmbd_conn_transport_destroy();\n \tksmbd_crypto_destroy();\n \tksmbd_free_global_file_table();\n \tdestroy_lease_table(NULL);\n", "prefixes": [] }