lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_157A2A1CAF19A3F5885F0687426159A19708@qq.com>
Date:   Mon, 11 Sep 2023 22:55:09 +0800
From:   Rong Tao <rtoax@...mail.com>
To:     akpm@...ux-foundation.org, keescook@...omium.org,
        brauner@...nel.org, rongtao@...tc.cn, rtoax@...mail.com
Cc:     Jeff Xu <jeffxu@...gle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Aleksa Sarai <cyphar@...har.com>,
        linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] pid: pid_ns_ctl_handler: Remove useless comment

From: Rong Tao <rongtao@...tc.cn>

commit 95846ecf9dac("pid: replace pid bitmap implementation with IDR API")
removes 'last_pid' element, and use the idr_get_cursor-idr_set_cursor pair
to set the value of idr, so useless comments should be removed.

Signed-off-by: Rong Tao <rongtao@...tc.cn>
---
 kernel/pid_namespace.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 619972c78774..3028b2218aa4 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -286,12 +286,6 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
 	if (write && !checkpoint_restore_ns_capable(pid_ns->user_ns))
 		return -EPERM;
 
-	/*
-	 * Writing directly to ns' last_pid field is OK, since this field
-	 * is volatile in a living namespace anyway and a code writing to
-	 * it should synchronize its usage with external means.
-	 */
-
 	next = idr_get_cursor(&pid_ns->idr) - 1;
 
 	tmp.data = &next;
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ