diff --git a/include/linux/compat.h b/include/linux/compat.h
index 90744b5..cfe0e44 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -108,6 +108,29 @@ typedef struct compat_sigevent {
 	} _sigev_un;
 } compat_sigevent_t;
 
+struct compat_robust_list {
+	compat_uptr_t			next;
+};
+
+struct compat_robust_list_head {
+	struct compat_robust_list	list;
+	compat_long_t			futex_offset;
+	compat_uptr_t			list_op_pending;
+};
+
+extern void compat_exit_robust_list(struct task_struct *curr);
+
+asmlinkage long
+compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
+			   compat_size_t len);
+asmlinkage long
+compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr,
+			   compat_size_t __user *len_ptr);
+
+static inline compat_uptr_t ptr_to_compat(void __user *uptr)
+{
+	return (u32)(unsigned long)uptr;
+}
 
 long compat_sys_semctl(int first, int second, int third, void __user *uptr);
 long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e96dcb3..ae5046d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -729,6 +729,9 @@ struct task_struct {
 	struct rt_mutex_waiter *pi_blocked_on;
 
 	struct robust_list_head __user *robust_list;
+#ifdef CONFIG_COMPAT
+	struct compat_robust_list_head __user *compat_robust_list;
+#endif
 	struct list_head pi_state_list;
 	void *pi_state_cache;
 };
diff --git a/kernel/exit.c b/kernel/exit.c
index d5fdd41..88f6f51 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -982,6 +982,10 @@ asmlinkage NORET_TYPE void do_exit(long code)
 
 	if (unlikely(tsk->robust_list))
 		exit_robust_list(tsk);
+#if defined(CONFIG_FUTEX) && defined(CONFIG_COMPAT)
+	if (unlikely(tsk->compat_robust_list))
+		compat_exit_robust_list(tsk);
+#endif
 
 	if (unlikely(tsk->audit_context))
 		audit_free(tsk);
diff --git a/kernel/fork.c b/kernel/fork.c
index b1f682d..16647ae 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1271,6 +1271,9 @@ task_t *copy_process(unsigned long clone_flags,
 	 */
 	p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL;
 	p->robust_list = NULL;
+#ifdef CONFIG_COMPAT
+	p->compat_robust_list = NULL;
+#endif
 	INIT_LIST_HEAD(&p->pi_state_list);
 	p->pi_state_cache = NULL;
 
diff --git a/kernel/futex_pi.c b/kernel/futex_pi.c
index a7b1856..5c7e4e5 100644
--- a/kernel/futex_pi.c
+++ b/kernel/futex_pi.c
@@ -2120,7 +2120,7 @@ __initcall(init);
 
 
 
-#if 0
+#ifdef CONFIG_COMPAT
 
 #include <linux/compat.h>
 
@@ -2128,7 +2128,7 @@ __initcall(init);
  * Fetch a robust-list pointer. Bit 0 signals PI futexes:
  */
 static inline int
-fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
+compat_fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
 		   compat_uptr_t *head, int *pi)
 {
 	if (get_user(*uentry, head))
@@ -2168,7 +2168,7 @@ void compat_exit_robust_list(struct task_struct *curr)
 	 * Fetch the list head (which was registered earlier, via
 	 * sys_set_robust_list()):
 	 */
-	if (fetch_robust_entry(&uentry, &entry, &head->list.next, &pi))
+	if (compat_fetch_robust_entry(&uentry, &entry, &head->list.next, &pi))
 		return;
 	/*
 	 * Fetch the relative futex offset:
@@ -2179,7 +2179,7 @@ void compat_exit_robust_list(struct task_struct *curr)
 	 * Fetch any possibly pending lock-add first, and handle it
 	 * if it exists:
 	 */
-	if (fetch_robust_entry(&upending, &pending,
+	if (compat_fetch_robust_entry(&upending, &pending,
 			       &head->list_op_pending, &pip))
 		return;
 
@@ -2189,7 +2189,7 @@ void compat_exit_robust_list(struct task_struct *curr)
 		 * Fetch the next entry in the list before calling
 		 * handle_futex_death:
 		 */
-		rc = fetch_robust_entry(&next_uentry, &next_entry,
+		rc = compat_fetch_robust_entry(&next_uentry, &next_entry,
 			(compat_uptr_t __user *)&entry->next, &next_pi);
 		/*
 		 * A pending lock might already be on the list, so
@@ -2268,7 +2268,7 @@ err_unlock:
 	return ret;
 }
 
-asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
+asmlinkage long compat_sys_futex_pi(u32 __user *uaddr, int op, u32 val,
 		struct compat_timespec __user *utime, u32 __user *uaddr2,
 		u32 val3)
 {
@@ -2292,7 +2292,7 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
 	if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE)
 		val2 = (int) (unsigned long) utime;
 
-	return do_futex(uaddr, op, val, timeout, uaddr2, val2, val3);
+	return do_futex_pi(uaddr, op, val, timeout, uaddr2, val2, val3);
 }
 
 #endif /* CONFIG_COMPAT */
