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: <20140827160928.6f323642@sluggy>
Date:	Wed, 27 Aug 2014 16:09:28 -0500
From:	Clark Williams <williams@...hat.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	RT <linux-rt-users@...r.kernel.org>
Subject: [PATCH RT]  rt: add rwsem_is_contended() definition to rwsem_rt.h

Thomas,

The latest btrfs code uses rwsem_is_contended() in the function
caching_thread(). On RT systems, include/linux/rwsem.h is replaced with
include/linux/rwsem_rt.h which does not provide a definition for
rwsem_is_contended().  This commit provides a definition that should
work on RT (where the lock is actually an rt_mutex).

Signed-off-by: Clark Williams <williams@...hat.com>
---
 include/linux/rwsem_rt.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/rwsem_rt.h b/include/linux/rwsem_rt.h
index e94d945c5844..77035d7abc04 100644
--- a/include/linux/rwsem_rt.h
+++ b/include/linux/rwsem_rt.h
@@ -125,4 +125,9 @@ static inline void down_write_nest_lock(struct rw_semaphore *sem,
        rt_down_write_nested_lock(sem, NULL);
 }
 #endif
+
+static inline int rwsem_is_contended(struct rw_semaphore *sem)
+{
+       return !plist_head_empty(&sem->lock.wait_list);
+}
 #endif

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ