Skip to contentSkip to conversation

linux-next: manual merge of the cgroup tree with the mm-unstable tree

PATCH Mark Brown 1 participant 1 message May 18

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

Today's linux-next merge of the cgroup tree got a conflict in:

tools/testing/selftests/cgroup/test_memcontrol.c

between commit:

186fdfd222a15 ("selftests/cgroup: rename PAGE_SIZE to BUF_SIZE in cgroup_util")

from the mm-unstable tree and commit:

2a7d34eba5f5a ("selftests/cgroup: check malloc return value in alloc_anon functions")

from the cgroup tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

tools/testing/selftests/cgroup/test_memcontrol.c +0 -0
diff --cc tools/testing/selftests/cgroup/test_memcontrol.c
index 44338dbaee819,21aedb35cc122..0000000000000
@@@ -61,10 -60,26 +61,26 @@@ static char *alloc_and_populate_anon(si
  	char *buf, *ptr;
  
  	buf = malloc(size);
+ 	if (buf == NULL) {
+ 		fprintf(stderr, "malloc() failed\n");
+ 		return NULL;
+ 	}
+ 
 -	for (ptr = buf; ptr < buf + size; ptr += PAGE_SIZE)
 +	for (ptr = buf; ptr < buf + size; ptr += page_size)
  		*ptr = 0;
  
+ 	return buf;
+ }
+ 
+ int alloc_anon(const char *cgroup, void *arg)
+ {
+ 	size_t size = (unsigned long)arg;
+ 	char *buf;
+ 
+ 	buf = alloc_and_populate_anon(size);
+ 	if (!buf)
+ 		return -1;
+ 
  	free(buf);
  	return 0;
  }