瀏覽代碼

[PATCH] schedule removal of FUTEX_FD

Apparently FUTEX_FD is unfixably racy and nothing uses it (or if it does, it
shouldn't).

Add a warning printk, give any remaining users six months to migrate off it.

Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton 18 年之前
父節點
當前提交
19c6b6ed3f
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      kernel/futex.c

+ 7 - 0
kernel/futex.c

@@ -1507,6 +1507,13 @@ static int futex_fd(u32 __user *uaddr, int signal)
 	struct futex_q *q;
 	struct futex_q *q;
 	struct file *filp;
 	struct file *filp;
 	int ret, err;
 	int ret, err;
+	static unsigned long printk_interval;
+
+	if (printk_timed_ratelimit(&printk_interval, 60 * 60 * 1000)) {
+		printk(KERN_WARNING "Process `%s' used FUTEX_FD, which "
+		    	"will be removed from the kernel in June 2007\n",
+			current->comm);
+	}
 
 
 	ret = -EINVAL;
 	ret = -EINVAL;
 	if (!valid_signal(signal))
 	if (!valid_signal(signal))