Message ID | 20221016123031.3963-3-petr.pavlu@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp996341wrs; Sun, 16 Oct 2022 05:31:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM71St43npNWmuDlhjgj5C7hrXuzFf2BCEq5Vf4/VOCpR730r/6bTWCX+ru0wpUMJzYAqjby X-Received: by 2002:a63:4d4:0:b0:46b:1279:15f with SMTP id 203-20020a6304d4000000b0046b1279015fmr6490714pge.534.1665923504194; Sun, 16 Oct 2022 05:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665923504; cv=none; d=google.com; s=arc-20160816; b=shJEahRHnIoKx1ixp+sLEokfxVTUyANCZhZTyWuWR4g4dPI6Udd228lYD/qkb/3Sh4 k4PIbqpLvQA8+i42tbem18Ci3FZOU6QUC01lV2bgfKwmGpdXCVavR9DVml+AA0/XJEC0 r6ZTCAcQk9ek3pWVf9RwWNzi0lWUHF3UNngbAszDFf170N6J93kCoBZyzlBVmMyDkEDg hb26258rgYUN3N5OYyxFV0iRszf0aiU0fCYS6/2WaOMo9D8d1cmRre+cYh3bEnnAATSs MXxhOKuTz/iu2Ztw22TKGXalaMkjC9OpPuhv8S3mACYgmrrzi7DXYPrjXtmvRPGydpTh GaFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qD3P5jMHsGMDFWM0XMYxlTpTliGBHcgI0IoO+d5uMKw=; b=mLK5tZT2tUhKydeQ5FwnXi0f2uMLJ0oWwlYz08mjM6NUeB2f7OobWmJvSmOTXc6Wc8 xZBhb//kptcmsrodDEPimf+YfS5tG04A4Q37lLx1lWxlH0aevpmcdLCk9/fpkEa7xHDZ FbMJviV6b2m4Jy4OYHaU/sYc9Psi20f9JNwVERT5+t5J+i2ORAxyP4uenHS2eY6NWVMT 9M9tU3XZdczfOEOnuwdAg/vNXvWE7jHhoSb/EqmtKvE4ygPYngKhK54uMCKhFfPH8HMw 4BmJmjxbkEn1u25sr8xnvqLCk9wNPjn7IBTXNd6fESB9jXHuCphF4gxpbsknSK/n12Iv 6EHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bs65FvbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a62b414000000b0054114c6685asi7774176pfn.129.2022.10.16.05.31.31; Sun, 16 Oct 2022 05:31:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bs65FvbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbiJPMbY (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Sun, 16 Oct 2022 08:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiJPMbU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 16 Oct 2022 08:31:20 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAB036845; Sun, 16 Oct 2022 05:31:19 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EA0B633A46; Sun, 16 Oct 2022 12:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1665923477; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qD3P5jMHsGMDFWM0XMYxlTpTliGBHcgI0IoO+d5uMKw=; b=bs65FvbUgTVRWxu05wBg6EcttKoaGu4Sl0WaKZCRNu0yBZCRd/0ZD6Pb3eMfVGEz+kjWnA cxDRF5w5PyxtoTkL5oHlJ4dZcUJ3OYN5Mde52jKaP0nxwOBW5ef/omAFddoEGidv7csQ+X JTozn+2vFRFLGTbz6p0qvbiap9r4fg0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BA42813A36; Sun, 16 Oct 2022 12:31:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iE2PLJX5S2MyMAAAMHmgww (envelope-from <petr.pavlu@suse.com>); Sun, 16 Oct 2022 12:31:17 +0000 From: Petr Pavlu <petr.pavlu@suse.com> To: mcgrof@kernel.org Cc: pmladek@suse.com, david@redhat.com, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Pavlu <petr.pavlu@suse.com> Subject: [PATCH v3 2/4] module: Update a comment describing what is protected by module_mutex Date: Sun, 16 Oct 2022 14:30:29 +0200 Message-Id: <20221016123031.3963-3-petr.pavlu@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221016123031.3963-1-petr.pavlu@suse.com> References: <20221016123031.3963-1-petr.pavlu@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746847404738723502?= X-GMAIL-MSGID: =?utf-8?q?1746847404738723502?= |
Series |
module: Merge same-name module load requests
|
|
Commit Message
Petr Pavlu
Oct. 16, 2022, 12:30 p.m. UTC
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
kernel/module/main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On 16.10.22 14:30, Petr Pavlu wrote: > Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> > --- > kernel/module/main.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/kernel/module/main.c b/kernel/module/main.c > index a12e177ea81f..5288843ca40f 100644 > --- a/kernel/module/main.c > +++ b/kernel/module/main.c > @@ -62,10 +62,11 @@ > > /* > * Mutex protects: > - * 1) List of modules (also safely readable with preempt_disable), > + * 1) list of modules (also safely readable with preempt_disable, delete and add > + * uses RCU list operations). > * 2) module_use links, > - * 3) mod_tree.addr_min/mod_tree.addr_max. > - * (delete and add uses RCU list operations). > + * 3) mod_tree.addr_min/mod_tree.addr_max, > + * 4) list of unloaded_tainted_modules. > */ > DEFINE_MUTEX(module_mutex); > LIST_HEAD(modules); Reviewed-by: David Hildenbrand <david@redhat.com>
On Sun 2022-10-16 14:30:29, Petr Pavlu wrote: > Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> > --- > kernel/module/main.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/kernel/module/main.c b/kernel/module/main.c > index a12e177ea81f..5288843ca40f 100644 > --- a/kernel/module/main.c > +++ b/kernel/module/main.c > @@ -62,10 +62,11 @@ > > /* > * Mutex protects: > - * 1) List of modules (also safely readable with preempt_disable), > + * 1) list of modules (also safely readable with preempt_disable, delete and add This is slightly over 80 characters per line ;-) It is not reported by checkpatch.pl because the longer line sometimes makes the code better readable. So people asked to make checkpatch.pl more relaxed and accept lines < 100. But the 80-characters per-line rule is still there. It should be honored when it does not make things visibly worse. > + * uses RCU list operations). > * 2) module_use links, > - * 3) mod_tree.addr_min/mod_tree.addr_max. > - * (delete and add uses RCU list operations). > + * 3) mod_tree.addr_min/mod_tree.addr_max, > + * 4) list of unloaded_tainted_modules. Please, mention that this list can be safely read using RCU. It is similar to the list of modules. Also it would be nice to mention the commit 99bd9956551b27cb6f ("module: Introduce module unload taint tracking") in the commit message. It helps to find the related code. Also this is kind of a followup fix. > */ > DEFINE_MUTEX(module_mutex); > LIST_HEAD(modules); All the above are minor or cosmetic issues. Feel free to use: Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
diff --git a/kernel/module/main.c b/kernel/module/main.c index a12e177ea81f..5288843ca40f 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -62,10 +62,11 @@ /* * Mutex protects: - * 1) List of modules (also safely readable with preempt_disable), + * 1) list of modules (also safely readable with preempt_disable, delete and add + * uses RCU list operations). * 2) module_use links, - * 3) mod_tree.addr_min/mod_tree.addr_max. - * (delete and add uses RCU list operations). + * 3) mod_tree.addr_min/mod_tree.addr_max, + * 4) list of unloaded_tainted_modules. */ DEFINE_MUTEX(module_mutex); LIST_HEAD(modules);