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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9df5fa10808080829l6275a208u65b3c48dafe6c8e1@mail.gmail.com>
Date:	Fri, 8 Aug 2008 21:29:19 +0600
From:	"Rakib Mullick" <rakib.mullick@...il.com>
To:	"Paul Menage" <menage@...gle.com>, "Paul Jackson" <pj@....com>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] cgroup.c: Some 'hlist_head' function fixes.

Hello guys, the following patch emphasizes on two things:
	1. We can carry out the following function with one variable.
	2. As hash_long returns with unsigned long we need a unsigned long to
handle this.
If anything else, please notice.
Thanks.

Signed-off-by: Md.Rakib H. Mullick (rakib.mullick@...il.com)

--- linux-2.6.27-rc2.orig/kernel/cgroup.c	2008-08-06 16:23:26.000000000 +0600
+++ linux-2.6.27-rc2/kernel/cgroup.c	2008-08-08 19:06:53.000000000 +0600
@@ -200,17 +200,16 @@ static struct hlist_head css_set_table[C

 static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[])
 {
-	int i;
-	int index;
-	unsigned long tmp = 0UL;
+	unsigned long tmp = 0UL , i;

 	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++)
 		tmp += (unsigned long)css[i];
 	tmp = (tmp >> 16) ^ tmp;

-	index = hash_long(tmp, CSS_SET_HASH_BITS);
+	i = 0;
+	i = hash_long(tmp, CSS_SET_HASH_BITS);

-	return &css_set_table[index];
+	return &css_set_table[i];
 }

 /* We don't maintain the lists running through each css_set to its
--
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