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] [day] [month] [year] [list]
Date:	Wed, 7 Oct 2009 19:25:11 GMT
From:	tip-bot for Darren Hart <dvhltc@...ibm.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, dvhltc@...ibm.com, hpa@...or.com,
	mingo@...hat.com, eric.dumazet@...il.com, johnstul@...ibm.com,
	peterz@...radead.org, dino@...ibm.com, hcb@...oticmind.net,
	stable@...nel.org, tglx@...utronix.de
Subject: [tip:core/urgent] futex: fix requeue_pi key imbalance

Commit-ID:  da085681014fb43d67d9bf6d14bc068e9254bd49
Gitweb:     http://git.kernel.org/tip/da085681014fb43d67d9bf6d14bc068e9254bd49
Author:     Darren Hart <dvhltc@...ibm.com>
AuthorDate: Wed, 7 Oct 2009 11:46:54 -0700
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 7 Oct 2009 21:22:03 +0200

futex: fix requeue_pi key imbalance

If futex_wait_requeue_pi() wakes prior to requeue, we drop the
reference to the source futex_key twice, once in
handle_early_requeue_pi_wakeup() and once on our way out.

Remove the drop from the handle_early_requeue_pi_wakeup() and keep
the get/drops together in futex_wait_requeue_pi().

Reported-by: Helge Bahmann <hcb@...oticmind.net>
Signed-off-by: Darren Hart <dvhltc@...ibm.com>
Cc: Helge Bahmann <hcb@...oticmind.net>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: Dinakar Guniguntala <dino@...ibm.com>
Cc: John Stultz <johnstul@...ibm.com>
Cc: stable-2.6.31 <stable@...nel.org>
LKML-Reference: <4ACCE21E.5030805@...ibm.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 kernel/futex.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index 1e176f3..c3bb2fc 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2111,7 +2111,6 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
 		 * Unqueue the futex_q and determine which it was.
 		 */
 		plist_del(&q->list, &q->list.plist);
-		drop_futex_key_refs(&q->key);
 
 		if (timeout && !timeout->task)
 			ret = -ETIMEDOUT;
--
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