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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 14 May 2014 17:22:40 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Tejun Heo <tj@...nel.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Michal Hocko <mhocko@...e.cz>
Subject: linux-next: manual merge of the akpm-current tree with the cgroup
 tree

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in
mm/memcontrol.c between commit 6770c64e5c8d ("cgroup: replace
cftype->trigger() with cftype->write()") from the cgroup tree and
commits 15aa061d2994 ("memcg: deprecate memory.force_empty knob") and
2423e4fd8967 ("memcg-deprecate-memoryforce_empty-knob-fix") 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@...b.auug.org.au

diff --cc mm/memcontrol.c
index 66447745d0c0,2cb81478d30c..000000000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -833,9 -829,9 +826,9 @@@ retry
  	 * we will to add it back at the end of reclaim to its correct
  	 * position in the tree.
  	 */
- 	__mem_cgroup_remove_exceeded(mz->memcg, mz, mctz);
+ 	__mem_cgroup_remove_exceeded(mz, mctz);
  	if (!res_counter_soft_limit_excess(&mz->memcg->res) ||
 -		!css_tryget(&mz->memcg->css))
 +	    !css_tryget_online(&mz->memcg->css))
  		goto retry;
  done:
  	return mz;
@@@ -4895,7 -4795,11 +4794,11 @@@ static ssize_t mem_cgroup_force_empty_w
  
  	if (mem_cgroup_is_root(memcg))
  		return -EINVAL;
+ 	pr_info_once("%s (%d): memory.force_empty is deprecated and will be "
+ 		     "removed.  Let us know if it is needed in your usecase at "
+ 		     "linux-mm@...ck.org\n",
+ 		     current->comm, task_pid_nr(current));
 -	return mem_cgroup_force_empty(memcg);
 +	return mem_cgroup_force_empty(memcg) ?: nbytes;
  }
  
  static u64 mem_cgroup_hierarchy_read(struct cgroup_subsys_state *css,
@@@ -5176,8 -5080,26 +5080,26 @@@ static ssize_t mem_cgroup_write(struct 
  		else
  			return -EINVAL;
  		break;
+ 	case RES_LOW_LIMIT:
+ 		if (mem_cgroup_is_root(memcg)) { /* Can't set limit on root */
+ 			ret = -EINVAL;
+ 			break;
+ 		}
+ 		ret = res_counter_memparse_write_strategy(buffer, &val);
+ 		if (ret)
+ 			break;
+ 		if (type == _MEM) {
+ 			ret = res_counter_set_low_limit(&memcg->res, val);
+ 			break;
+ 		}
+ 		/*
+ 		 * memsw low limit doesn't make any sense and kmem is not
+ 		 * implemented yet - if ever
+ 		 */
+ 		return -EINVAL;
+ 
  	case RES_SOFT_LIMIT:
 -		ret = res_counter_memparse_write_strategy(buffer, &val);
 +		ret = res_counter_memparse_write_strategy(buf, &val);
  		if (ret)
  			break;
  		/*
@@@ -6117,9 -6020,15 +6024,15 @@@ static struct cftype mem_cgroup_files[
  		.read_u64 = mem_cgroup_read_u64,
  	},
  	{
+ 		.name = "low_limit_in_bytes",
+ 		.private = MEMFILE_PRIVATE(_MEM, RES_LOW_LIMIT),
+ 		.write_string = mem_cgroup_write,
+ 		.read_u64 = mem_cgroup_read_u64,
+ 	},
+ 	{
  		.name = "soft_limit_in_bytes",
  		.private = MEMFILE_PRIVATE(_MEM, RES_SOFT_LIMIT),
 -		.write_string = mem_cgroup_write,
 +		.write = mem_cgroup_write,
  		.read_u64 = mem_cgroup_read_u64,
  	},
  	{
@@@ -6134,7 -6043,8 +6047,8 @@@
  	},
  	{
  		.name = "force_empty",
+ 		.flags = CFTYPE_INSANE,
 -		.trigger = mem_cgroup_force_empty_write,
 +		.write = mem_cgroup_force_empty_write,
  	},
  	{
  		.name = "use_hierarchy",

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ