linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: nishimura@mxp.nes.nec.co.jp
Cc: Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/2] memcg clean up try_charge main loop
Date: Fri, 4 Jun 2010 09:26:41 +0900	[thread overview]
Message-ID: <20100604092641.e1e5a7c1.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20100603193809.9d5f6314.d-nishimura@mtf.biglobe.ne.jp>

On Thu, 3 Jun 2010 19:38:09 +0900
Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp> wrote:

> One more comment.
> 
> > +	ret = res_counter_charge(&mem->res, csize, &fail_res);
> > +
> > +	if (likely(!ret)) {
> > +		if (!do_swap_account)
> > +			return CHARGE_OK;
> > +		ret = res_counter_charge(&mem->memsw, csize, &fail_res);
> > +		if (likely(!ret))
> > +			return CHARGE_OK;
> > +
> > +		mem_over_limit = mem_cgroup_from_res_counter(fail_res, res);
> This must be mem_cgroup_from_res_counter(fail_res, memsw).
> We will access to an invalid pointer, otherwise.
> 
ouch..ok. (my test wasn't enough..)

I'll rewrite this against the new mmotm.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-06-04  0:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03  2:48 KAMEZAWA Hiroyuki
2010-06-03  2:51 ` [PATCH 2/2] memcg make move_task_charge check clearer KAMEZAWA Hiroyuki
2010-06-03  6:40   ` Daisuke Nishimura
2010-06-03  7:01     ` KAMEZAWA Hiroyuki
2010-06-03  6:06 ` [PATCH 1/2] memcg clean up try_charge main loop Daisuke Nishimura
2010-06-03  6:28   ` KAMEZAWA Hiroyuki
2010-06-03 10:38     ` Daisuke Nishimura
2010-06-04  0:26       ` KAMEZAWA Hiroyuki [this message]
2010-06-04  5:45 ` [PATCH 1/2] memcg clean up try_charge main loop v2 KAMEZAWA Hiroyuki
2010-06-04  5:49   ` [PATCH 2/2] memcg clean up waiting move acct v2 KAMEZAWA Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100604092641.e1e5a7c1.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=d-nishimura@mtf.biglobe.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox