linux-next: manual merge of the akpm-current tree with the tip tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in
kernel/futex.c between commit a52b89ebb6d4 ("futexes: Increase hash table
size for better performance") from the tip tree and commit 61beee6c76e5
("futex: switch to USER_DS for futex test") from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc kernel/futex.c
index 3666aa0017ed,66d23727c6ab..000000000000
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@@ -63,7 -63,7 +63,8 @@@
  #include <linux/sched/rt.h>
  #include <linux/hugetlb.h>
  #include <linux/freezer.h>
 +#include <linux/bootmem.h>
+ #include <linux/uaccess.h>
  
  #include <asm/futex.h>
  
@@@ -2845,19 -2734,9 +2846,20 @@@ SYSCALL_DEFINE6(futex, u32 __user *, ua
  
  static int __init futex_init(void)
  {
+ 	mm_segment_t fs;
  	u32 curval;
 -	int i;
 +	unsigned long i;
 +
 +#if CONFIG_BASE_SMALL
 +	futex_hashsize = 16;
 +#else
 +	futex_hashsize = roundup_pow_of_two(256 * num_possible_cpus());
 +#endif
 +
 +	futex_queues = alloc_large_system_hash("futex", sizeof(*futex_queues),
 +					       futex_hashsize, 0,
 +					       futex_hashsize < 256 ? HASH_SMALL : 0,
 +					       NULL, NULL, futex_hashsize, futex_hashsize);
  
  	/*
  	 * This will fail and we want it. Some arch implementations do
@@@ -2869,10 -2748,13 +2871,13 @@@
  	 * implementation, the non-functional ones will return
  	 * -ENOSYS.
  	 */
+ 	fs = get_fs();
+ 	set_fs(USER_DS);
  	if (cmpxchg_futex_value_locked(&curval, NULL, 0, 0) == -EFAULT)
  		futex_cmpxchg_enabled = 1;
+ 	set_fs(fs);
  
 -	for (i = 0; i < ARRAY_SIZE(futex_queues); i++) {
 +	for (i = 0; i < futex_hashsize; i++) {
  		plist_head_init(&futex_queues[i].chain);
  		spin_lock_init(&futex_queues[i].lock);
  	}

Attachment: pgpqApWIizuAT.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux