Message ID | 20240206-bus_cleanup-workqueue-v1-1-72b10d282d58@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1807103dyb; Tue, 6 Feb 2024 12:33:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHah1z6zwCi7FnIMVJW7BPI4zUsL2QCclOlDs5gY4rFrneRRI6zAmRH58JDziV+sSJQO8Li X-Received: by 2002:a17:90a:d18d:b0:295:f30d:ae6 with SMTP id fu13-20020a17090ad18d00b00295f30d0ae6mr713726pjb.16.1707251631532; Tue, 06 Feb 2024 12:33:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707251631; cv=pass; d=google.com; s=arc-20160816; b=sSWg5HPefjmEh4eMJjCumPyR+8lg6ce1tJmwCAUm3twUmj+VfjmQMtusEknDFyd5GL nlG4PGDZgyNW5QAYnAk9l2435LprodL2kK0ZdvKz456YEpxImXD3XxY9UjL7zheEYcIw pUqCdOs7eNRfqMnK/qNNOzoVbjJmEn4B7ALD4g4S3aYlxec5UJ0ib2YEwUM7TptjR5WZ OOvSMZmnbU3Qr3dVwo+FGzfdJ87HjCZPa3hnTiJiLBmMx9dtv6DXOhF0ceVWF+w77C+P lzm3KWTxwW7p6XR6Ts1Y/Z6NgWq6TiUTo/+bTSSLKbXyKRy2YvdXPQU8JfXFLb64ul/h ZWHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :dkim-signature:from; bh=6/sMfQ4C2LqtKvqqdaWxWMsx/4R6rTjfiNR3jdV33D4=; fh=4Q6uezGWggsIzdTpGnRAKeKjzuUpDDVDCUpco1mugo4=; b=lh5H4MQcpHNSaxvJ2wbLwlyVhoCzuuhJM9D4ihIUzld/ufhYwB7f+FDyA/CrKUu2mK ZJ6gCFAfBCEI4r0ALuS/N5jcNXboJyfC9RB+F9iCrLKf+bHpRZJdoOXrmyZXL1tzbQ3B gRxoAEit4DNDkkZoa/xHdvwzN8KCUgoQXdipTrtSEO5sEv2TCsGQ7/PrIu/oFwVap8It hj7GOnLr4TsezNT48WSs+WUqTDjJoQeGNVi/eCGYV6TUAC46zolPqSHxCgNj2XqaXCUu BwzH9DTu03c04G3UTvOBB09kVA4PJgdMTeezTLJFVkG/6KebMWjoId/18deGGEiSQBkd 4FfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=iJ7+Rq+8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCXt4yUXi0/qQjCijAcizQHJER2Zyhtyn6JAFbTdsX5Ctz8cIAF24nrXCNhhRT0XOfZdn8BBUAQE3QgUMa6YUOyMNzqUCA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d20-20020a17090ab31400b002962f429837si1686847pjr.145.2024.02.06.12.33.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 12:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=iJ7+Rq+8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55433-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7EFEB289D30 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 18:05:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1397C13AE2; Tue, 6 Feb 2024 18:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="iJ7+Rq+8" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDEC912B9C for <linux-kernel@vger.kernel.org>; Tue, 6 Feb 2024 18:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707242694; cv=none; b=edBwOzbU95WYN0Ok0m6iVe3MRwstIpbB6Gs6aaEN3rrcHevJVXy9ZrEI9MEFoq6/dbjcSnByFm8vS4MZ+9M/g5kAM2d7AIWKXI/ioWBsWVvdVEYgAi4EHody+77ult4TmjPnvo1Uvvtgk+pY+l/AgRjHcyNoPBaAX4lxpcVsEQQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707242694; c=relaxed/simple; bh=csIGa+rd7lcNnhTQbpItKD6NpMqF39eNVB3gtdBsnA0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=eDNz5VmWittqgZiI4aKiXnLG83PT3l58pW65sYLBGKfhKq/XnKeR61bNRC5ySBnsQVsYa3PP2nQzmy/8hdo6N/SUYfo9n5QGXxf/qVMBvoCHxNL5MG/WAoKLdRy51o/hW1l/+s34cMJqN1W2DZj8dB+pQ5PR3/v6cZ0PCgnBM4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=iJ7+Rq+8; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1d7354ba334so51346775ad.1 for <linux-kernel@vger.kernel.org>; Tue, 06 Feb 2024 10:04:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707242687; x=1707847487; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:dkim-signature:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6/sMfQ4C2LqtKvqqdaWxWMsx/4R6rTjfiNR3jdV33D4=; b=uAO2tFm+vaUiy7yZAu346yuOkVLb6BDbb/DuCFgeHa0RWu4l6hcCclBm1DDEtzAqCK 9BgMLlzh4sJY4b8JsiC1EssSekTdYdYs2/aDUFdChrB89BFaxEbhSdguCyVZq8dsdd+4 AlmAk6UhKyFObBecQkae00gQxgi1eI6w4jVX82Zmc1+reRISzh+5bgXiueEINrtmoIkO oPCNEuzJDCsbBhhLTtIMXxaeSj903CSBKopHz3OldRBsF62Tjj9YqPLjHJG4CW5ltdPW U6UiTMo3VADXmnSWFRq92nwl5FYfiScOhAzeFsVAJZBwh5+zCEjWaLT3+leDo/isvPRB vscg== X-Gm-Message-State: AOJu0Yx0Ryke9d597KmnS0Ohcsp7FDDSl+9spe+t4Hgr8Ca97JLSorjH Wk+KZrBVDRRIPeIc7jQRgX/VbnID0Tj/aKtHqChZexAnW2HSl4iB X-Received: by 2002:a17:902:c947:b0:1d9:8082:4573 with SMTP id i7-20020a170902c94700b001d980824573mr3134146pla.2.1707242686937; Tue, 06 Feb 2024 10:04:46 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWxfcDMLUogxRqr60AgcSVAEVfMDX8DLtD+DxKDIy4wagpYhynC42ozQ+xJlGI8S104oshUKFE71P9CVqUHbh/R0XVdX0hjyL1I3pMpFQY89HM7smgwaxFT2Zuc2FjRcqZiLJAB Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id e16-20020a170902cf5000b001d9ce370415sm884579plg.90.2024.02.06.10.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:04:46 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707242685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/sMfQ4C2LqtKvqqdaWxWMsx/4R6rTjfiNR3jdV33D4=; b=iJ7+Rq+8feZu+ukBnYYkMMivm+bNOMEs4M7eabGmy5IiTT36FSD5Y9+u24YUW6gY6eud84 HsE+yJmqH2bZrfMQy2ckuwUaK0DYMwThA6rxPU0vmipyXN9V3A95gMuj0VCY/4n21cCUoo JnQPiIcwOGlrZXYLDyIbdkx7V8P4kBiouPd99tdJGfDxqPu+Ymbt9YDo4orr6qqiHWdUhF TSHALQNwM+OrYU+ovJoZw7YQvrUusoRBXKNsXyBAfSMHTTmPbUqajawwJY/PnwH7TGWFPZ 2hE/x1YNn+iFTuZNrsxtWPaQM4LVLVtQ+8Y4/q+kCE997coHiWoTFoIo0cjVsg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Tue, 06 Feb 2024 15:05:06 -0300 Subject: [PATCH] workqueue: make wq_subsys const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240206-bus_cleanup-workqueue-v1-1-72b10d282d58@marliere.net> X-B4-Tracking: v=1; b=H4sIANF0wmUC/x3M0QpAMBSA4VfRubbaZpvyKpKGgxMNW0PJu1suv 4v/fyCgJwxQZQ94PCnQ5hJEnkE/WzchoyEZJJeKS25YF0Pbr2hd3Nm1+eWIGJEJrUqrjC7kICC 1u8eR7v9bN+/7AfKWKkdnAAAA To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=1166; i=ricardo@marliere.net; h=from:subject:message-id; bh=csIGa+rd7lcNnhTQbpItKD6NpMqF39eNVB3gtdBsnA0=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlwnTcwzfqVRHqZhUZNfw///fw0r9IwUn5joN6v J9nzqTZxf6JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcJ03AAKCRDJC4p8Y4ZY psygEACo9A4c81fJKS97/6hziaVq+DgVpPtkloBf5QVMfzsuidx4Zr+l8UEWqlb+jXd+jLtGhzt 1rf1RyQaW8U77kcdkx7jLq6kyHSI+A3ZiyZMdM9gCRFaVZ1ejZjniV9NtUXXgcINXp2wz+odFoR ulSuD558rj6b33Zw+Uu8luRmbQAqT+6RX8SxpLYMS7pqWWDwlejwJDgy0kGP9Wgwc1hMTtRGrgd IQtkMAJtfPZlXMHA9cZhQOiBnQ7dzt2to9q6zEoaFu0MGRxZtGyJTBmpfxKzV4rYFuoIXyvZBdM AD3tirU+beEh/3yrhO8Pgq5eQjQmzfc3S4cZMEoal7d44b3i8whe4Na4tgZa7BwKib7LMa4FoNL X8THbHsOQSZV0tR0bhdXPhGL+30uQzpQ/9vxTN1W78gTItQW/eI97xQfcTk6Nr1gFVYx6mKxHc7 A92Hih/jhpPyXH7Q5UJGtE4mqrhg1k6TmcCXIN2BAcxoiVHxs4u1uftsdSeoPLsKokUcB2MwfOi KUUfARx/bo/jo5h4eNfK6OV1TEH09Viovqe2sTyHVXZTYC+YgI8MVTcLWcHGBx3pSdDFCC76OSW Ei2YPMiszy3DST7ISOVpVxi+lhoJH5kVusp9HHbmis7WQ9n28SadBFhhDrASJfjx0mZt6jxz9p3 NXC6/tXW6DpsRXw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790183086370674198 X-GMAIL-MSGID: 1790183086370674198 |
Series |
workqueue: make wq_subsys const
|
|
Commit Message
Ricardo B. Marliere
Feb. 6, 2024, 6:05 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
move the wq_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
The maintainer asked [1] for this patch to be received through the
driver-core tree.
[1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: f297a3844aa059c53be3f69be85ebc071b8a6d16
change-id: 20240206-bus_cleanup-workqueue-1547a46532d1
Best regards,
Comments
On Tue, Feb 06, 2024 at 03:05:06PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the wq_subsys variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > --- > The maintainer asked [1] for this patch to be received through the > driver-core tree. > [1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/ There is no cross-tree dependency at all, but hey, I'll take it, no worries... thanks, greg k-h
On Wed, Feb 07, 2024 at 10:12:34AM +0000, Greg Kroah-Hartman wrote: > On Tue, Feb 06, 2024 at 03:05:06PM -0300, Ricardo B. Marliere wrote: > > Now that the driver core can properly handle constant struct bus_type, > > move the wq_subsys variable to be a constant structure as well, > > placing it into read-only memory which can not be modified at runtime. > > > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > > --- > > The maintainer asked [1] for this patch to be received through the > > driver-core tree. > > [1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/ > > There is no cross-tree dependency at all, but hey, I'll take it, no > worries... Ah, my bad. I branched out wq/for-6.9 before rc1 and was assuming the dependent commit was still in the driver core branch. I should have just pulled linus#master. That said, that patch going through driver-core should still be fine. Thanks.
On Wed, Feb 07, 2024 at 06:34:27AM -1000, Tejun Heo wrote: > On Wed, Feb 07, 2024 at 10:12:34AM +0000, Greg Kroah-Hartman wrote: > > On Tue, Feb 06, 2024 at 03:05:06PM -0300, Ricardo B. Marliere wrote: > > > Now that the driver core can properly handle constant struct bus_type, > > > move the wq_subsys variable to be a constant structure as well, > > > placing it into read-only memory which can not be modified at runtime. > > > > > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > > > --- > > > The maintainer asked [1] for this patch to be received through the > > > driver-core tree. > > > [1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/ > > > > There is no cross-tree dependency at all, but hey, I'll take it, no > > worries... > > Ah, my bad. I branched out wq/for-6.9 before rc1 and was assuming the > dependent commit was still in the driver core branch. I should have just > pulled linus#master. The dependent changes are in 6.4, so before -rc1 would have been ok as well :) > That said, that patch going through driver-core should still be fine. Great, will do that, thanks! greg k-jh
On Thu, Feb 08, 2024 at 10:10:56AM +0000, Greg Kroah-Hartman wrote: > On Wed, Feb 07, 2024 at 06:34:27AM -1000, Tejun Heo wrote: > > On Wed, Feb 07, 2024 at 10:12:34AM +0000, Greg Kroah-Hartman wrote: > > > On Tue, Feb 06, 2024 at 03:05:06PM -0300, Ricardo B. Marliere wrote: > > > > Now that the driver core can properly handle constant struct bus_type, > > > > move the wq_subsys variable to be a constant structure as well, > > > > placing it into read-only memory which can not be modified at runtime. > > > > > > > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > > > > --- > > > > The maintainer asked [1] for this patch to be received through the > > > > driver-core tree. > > > > [1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/ > > > > > > There is no cross-tree dependency at all, but hey, I'll take it, no > > > worries... > > > > Ah, my bad. I branched out wq/for-6.9 before rc1 and was assuming the > > dependent commit was still in the driver core branch. I should have just > > pulled linus#master. > > The dependent changes are in 6.4, so before -rc1 would have been ok as > well :) Hmmm.... > git log -1 --oneline 32f78abe59c7 32f78abe59c7 driver core: bus: constantify subsys_register() calls > git describe --contains 32f78abe59c7 v6.8-rc1~61^2~10
On Thu, Feb 08, 2024 at 06:54:57AM -1000, Tejun Heo wrote: > On Thu, Feb 08, 2024 at 10:10:56AM +0000, Greg Kroah-Hartman wrote: > > On Wed, Feb 07, 2024 at 06:34:27AM -1000, Tejun Heo wrote: > > > On Wed, Feb 07, 2024 at 10:12:34AM +0000, Greg Kroah-Hartman wrote: > > > > On Tue, Feb 06, 2024 at 03:05:06PM -0300, Ricardo B. Marliere wrote: > > > > > Now that the driver core can properly handle constant struct bus_type, > > > > > move the wq_subsys variable to be a constant structure as well, > > > > > placing it into read-only memory which can not be modified at runtime. > > > > > > > > > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > > > > > --- > > > > > The maintainer asked [1] for this patch to be received through the > > > > > driver-core tree. > > > > > [1]: https://lore.kernel.org/all/ZcEeOueCbrltxr_b@slm.duckdns.org/ > > > > > > > > There is no cross-tree dependency at all, but hey, I'll take it, no > > > > worries... > > > > > > Ah, my bad. I branched out wq/for-6.9 before rc1 and was assuming the > > > dependent commit was still in the driver core branch. I should have just > > > pulled linus#master. > > > > The dependent changes are in 6.4, so before -rc1 would have been ok as > > well :) > > Hmmm.... > > > git log -1 --oneline 32f78abe59c7 > 32f78abe59c7 driver core: bus: constantify subsys_register() calls > > git describe --contains 32f78abe59c7 > v6.8-rc1~61^2~10 Ugh, sorry, you are totally right. Too many different "make X const" series are floating around now, my fault. I'll go suck this in now to end the pointless discussion where I am proven wrong multiple times :) greg k-h
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 76e60faed892..f1e062acd091 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6157,7 +6157,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = { __ATTR_NULL, }; -static struct bus_type wq_subsys = { +static const struct bus_type wq_subsys = { .name = "workqueue", .dev_groups = wq_sysfs_groups, };