Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15e408cd authored by Namhyung Kim's avatar Namhyung Kim Committed by Thomas Gleixner
Browse files

futex: Add lock context annotations



queue_lock/unlock/me() and unqueue_me_pi() grab/release spinlocks
but are missing proper annotations. Add them.

Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Darren Hart <dvhltc@us.ibm.com>
LKML-Reference: <1284468228-8723-3-git-send-email-namhyung@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent a3c74c52
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1360,6 +1360,7 @@ static int futex_requeue(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,


/* The key must be already stored in q->key. */
/* The key must be already stored in q->key. */
static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
	__acquires(&hb->lock)
{
{
	struct futex_hash_bucket *hb;
	struct futex_hash_bucket *hb;


@@ -1373,6 +1374,7 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)


static inline void
static inline void
queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb)
queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb)
	__releases(&hb->lock)
{
{
	spin_unlock(&hb->lock);
	spin_unlock(&hb->lock);
	drop_futex_key_refs(&q->key);
	drop_futex_key_refs(&q->key);
@@ -1391,6 +1393,7 @@ queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb)
 * an example).
 * an example).
 */
 */
static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb)
static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb)
	__releases(&hb->lock)
{
{
	int prio;
	int prio;


@@ -1471,6 +1474,7 @@ static int unqueue_me(struct futex_q *q)
 * and dropped here.
 * and dropped here.
 */
 */
static void unqueue_me_pi(struct futex_q *q)
static void unqueue_me_pi(struct futex_q *q)
	__releases(q->lock_ptr)
{
{
	WARN_ON(plist_node_empty(&q->list));
	WARN_ON(plist_node_empty(&q->list));
	plist_del(&q->list, &q->list.plist);
	plist_del(&q->list, &q->list.plist);