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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <isapiwc.47df251f.f8b.4d363a30.58500.62@mail.jp.nec.com>
Date:	Wed, 19 Jan 2011 10:11:12 +0900
From:	nishimura@....nes.nec.co.jp
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Miklos Szeredi <miklos@...redi.hu>, minchan.kim@...il.com,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Subject: Re: [PATCH v4] mm: add replace_page_cache_page() function

> On Wed, 19 Jan 2011 09:27:33 +0900
> Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:
> 
>> On Tue, 18 Jan 2011 15:28:44 -0800
>> Andrew Morton <akpm@...ux-foundation.org> wrote:
>> 
>> > On Tue, 18 Jan 2011 12:18:11 +0100
>> > Miklos Szeredi <miklos@...redi.hu> wrote:
>> > 
>> > > +int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
>> > > +{
>> > > +	int error;
>> > > +	struct mem_cgroup *memcg = NULL;
>> > 
>> > I'm suspecting that the unneeded initialisation was added to suppress a
>> > warning?
>> > 
>> No.
>> It's necessary for mem_cgroup_{prepare|end}_migration().
>> mem_cgroup_prepare_migration() will return without doing anything in
>> "if (mem_cgroup_disabled()" case(iow, "memcg" is not overwritten),
>> but mem_cgroup_end_migration() depends on the value of "memcg" to decide
>> whether prepare_migration has succeeded or not.
>> This may not be a good implementation, but IMHO I'd like to to initialize
>> valuable before using it in general.
>> 
> 
> I think it can be initlized in mem_cgroup_prepare_migration().
> I'll send patch later.
> 
I see, thanks.

I think you know it, but just a note:
mem_cgroup_{try_charge|commit_charge}_swapin()
use the same logic, so try_charge_swapin() should also be changed
for consistency.

Thanks,
Daisuke Nishimura.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ