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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1304894407-32201-69-git-send-email-lucian.grijincu@gmail.com>
Date:	Mon,  9 May 2011 00:39:20 +0200
From:	Lucian Adrian Grijincu <lucian.grijincu@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	netdev@...r.kernel.org,
	Lucian Adrian Grijincu <lucian.grijincu@...il.com>
Subject: [v2 068/115] sysctl: rename sysctl_head_next to sysctl_use_next_header

The new names makes it clear that this increments ctl_use_refs and
that _unuse must be used on the header. No functional change.

Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@...il.com>
---
 fs/proc/proc_sysctl.c  |    4 ++--
 include/linux/sysctl.h |    4 ++--
 kernel/sysctl.c        |    6 +++---
 kernel/sysctl_check.c  |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index b4cde14..068d39c 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -85,7 +85,7 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
 
 	p = find_in_table(table, name);
 	if (!p) {
-		for (h = sysctl_head_next(NULL); h; h = sysctl_head_next(h)) {
+		for (h = sysctl_use_next_header(NULL); h; h = sysctl_use_next_header(h)) {
 			if (h->attached_to != table)
 				continue;
 			p = find_in_table(h->attached_by, name);
@@ -265,7 +265,7 @@ static int proc_sys_readdir(struct file *filp, void *dirent, filldir_t filldir)
 	if (ret)
 		goto out;
 
-	for (h = sysctl_head_next(NULL); h; h = sysctl_head_next(h)) {
+	for (h = sysctl_use_next_header(NULL); h; h = sysctl_use_next_header(h)) {
 		if (h->attached_to != table)
 			continue;
 		ret = scan(h, h->attached_by, &pos, filp, dirent, filldir);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 3ff0a9e..4ed5235 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -955,8 +955,8 @@ extern void sysctl_head_get(struct ctl_table_header *);
 extern void sysctl_head_put(struct ctl_table_header *);
 extern int sysctl_is_seen(struct ctl_table_header *);
 extern struct ctl_table_header *sysctl_use_header(struct ctl_table_header *);
-extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
-extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces,
+extern struct ctl_table_header *sysctl_use_next_header(struct ctl_table_header *prev);
+extern struct ctl_table_header *__sysctl_use_next_header(struct nsproxy *namespaces,
 						struct ctl_table_header *prev);
 extern void sysctl_unuse_header(struct ctl_table_header *prev);
 extern int sysctl_perm(struct ctl_table_root *root,
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5d52e7a..e4ec23e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1587,7 +1587,7 @@ lookup_header_list(struct ctl_table_root *root, struct nsproxy *namespaces)
 	return &set->list;
 }
 
-struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces,
+struct ctl_table_header *__sysctl_use_next_header(struct nsproxy *namespaces,
 					    struct ctl_table_header *prev)
 {
 	struct ctl_table_root *root;
@@ -1631,9 +1631,9 @@ out:
 	return NULL;
 }
 
-struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev)
+struct ctl_table_header *sysctl_use_next_header(struct ctl_table_header *prev)
 {
-	return __sysctl_head_next(current->nsproxy, prev);
+	return __sysctl_use_next_header(current->nsproxy, prev);
 }
 
 void register_sysctl_root(struct ctl_table_root *root)
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index a3a58b8..44c31f0 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -28,8 +28,8 @@ static struct ctl_table *sysctl_check_lookup(struct nsproxy *namespaces,
 	struct ctl_table *ref, *test;
 	int cur_depth;
 
-	for (head = __sysctl_head_next(namespaces, NULL); head;
-	     head = __sysctl_head_next(namespaces, head)) {
+	for (head = __sysctl_use_next_header(namespaces, NULL); head;
+	     head = __sysctl_use_next_header(namespaces, head)) {
 		cur_depth = depth;
 		ref = head->ctl_table;
 repeat:
-- 
1.7.5.134.g1c08b

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ