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: <20070923015614.GA4024@APFDCB5C>
Date:	Sun, 23 Sep 2007 10:56:14 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andi Kleen <ak@...e.de>, Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] use pgd_list_add/pgd_list_del

Cleanup by using pgd_list_add() and pgd_list_del() in the right place.

Cc: Andi Kleen <ak@...e.de>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>

---
 include/asm-x86_64/pgalloc.h |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Index: 2.6-git/include/asm-x86_64/pgalloc.h
===================================================================
--- 2.6-git.orig/include/asm-x86_64/pgalloc.h
+++ 2.6-git/include/asm-x86_64/pgalloc.h
@@ -65,7 +65,6 @@ static inline void pgd_ctor(void *x)
 {
 	unsigned boundary;
 	pgd_t *pgd = x;
-	struct page *page = virt_to_page(pgd);
 
 	/*
 	 * Copy kernel pointers in from init.
@@ -75,19 +74,14 @@ static inline void pgd_ctor(void *x)
 		init_level4_pgt + boundary,
 		(PTRS_PER_PGD - boundary) * sizeof(pgd_t));
 
-	spin_lock(&pgd_lock);
-	list_add(&page->lru, &pgd_list);
-	spin_unlock(&pgd_lock);
+	pgd_list_add(pgd);
 }
 
 static inline void pgd_dtor(void *x)
 {
 	pgd_t *pgd = x;
-	struct page *page = virt_to_page(pgd);
 
-        spin_lock(&pgd_lock);
-	list_del(&page->lru);
-	spin_unlock(&pgd_lock);
+	pgd_list_del(pgd);
 }
 
 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
-
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