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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Nov 2010 16:26:58 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 6/7] BKL: mark lock_kernel as deprecated

No new code should use the big kernel lock, so
we should really emit compiler warnings to make
people building out of mainline code aware of
this.

Remove the unused cycle_kernel_lock() functions as well,
so we don't cause unnecessary build warnings.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 include/linux/smp_lock.h |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h
index 291f721..9590a0c 100644
--- a/include/linux/smp_lock.h
+++ b/include/linux/smp_lock.h
@@ -26,10 +26,12 @@ static inline int reacquire_kernel_lock(struct task_struct *task)
 
 extern void __lockfunc
 _lock_kernel(const char *func, const char *file, int line)
+__deprecated
 __acquires(kernel_lock);
 
 extern void __lockfunc
 _unlock_kernel(const char *func, const char *file, int line)
+__deprecated
 __releases(kernel_lock);
 
 #define lock_kernel() do {					\
@@ -40,24 +42,11 @@ __releases(kernel_lock);
 	_unlock_kernel(__func__, __FILE__, __LINE__);		\
 } while (0)
 
-/*
- * Various legacy drivers don't really need the BKL in a specific
- * function, but they *do* need to know that the BKL became available.
- * This function just avoids wrapping a bunch of lock/unlock pairs
- * around code which doesn't really need it.
- */
-static inline void cycle_kernel_lock(void)
-{
-	lock_kernel();
-	unlock_kernel();
-}
-
 #else
 
 #ifdef CONFIG_BKL /* provoke build bug if not set */
 #define lock_kernel()
 #define unlock_kernel()
-#define cycle_kernel_lock()			do { } while(0)
 #define kernel_locked()				1
 #endif /* CONFIG_BKL */
 
-- 
1.7.1

--
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