linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] mm: fix pageref leak in do_swap_page()
Date: Tue, 21 Apr 2009 14:15:58 +0530	[thread overview]
Message-ID: <20090421084558.GC19637@balbir.in.ibm.com> (raw)
In-Reply-To: <20090421081903.GA2527@cmpxchg.org>

* Johannes Weiner <hannes@cmpxchg.org> [2009-04-21 10:19:03]:

> On Tue, Apr 21, 2009 at 08:44:20AM +0530, Balbir Singh wrote:
> > * Johannes Weiner <hannes@cmpxchg.org> [2009-04-20 22:24:43]:
> > 
> > > By the time the memory cgroup code is notified about a swapin we
> > > already hold a reference on the fault page.
> > > 
> > > If the cgroup callback fails make sure to unlock AND release the page
> > > or we leak the reference.
> > > 
> > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> > > Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> > 
> > Seems reasonable to me, could you make the changelog more verbose and
> > mention that lookup_swap_cache() gets a reference to the page and we
> > need to release the extra reference.
> 
> Okay, I will add that information.
> 

Thanks

> > BTW, have you had any luck reproducing the issue? How did you catch
> > the problem?
> 
> I reviewed all the exit points when I shuffled code around in there
> for another series that uses a lighter version of do_wp_page() for
> swap write-faults.  I never triggered that problem.
>

Good way of catching a problem, play with the code :) 

-- 
	Balbir

--
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:[~2009-04-21  8:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 20:24 [patch 1/3] mm: fix pageref leak in do_swap_page() Johannes Weiner
2009-04-20 20:24 ` [patch 2/3][rfc] swap: try to reuse freed slots in the allocation area Johannes Weiner
2009-04-22 19:59   ` Hugh Dickins
2009-04-27  8:02     ` Johannes Weiner
2009-04-20 20:24 ` [patch 3/3][rfc] vmscan: batched swap slot allocation Johannes Weiner
2009-04-20 20:31   ` Johannes Weiner
2009-04-20 20:53     ` Andrew Morton
2009-04-20 21:38       ` Johannes Weiner
2009-04-21  0:58   ` KAMEZAWA Hiroyuki
2009-04-21  8:52     ` Johannes Weiner
2009-04-21  9:23       ` KAMEZAWA Hiroyuki
2009-04-21  9:54         ` Johannes Weiner
2009-04-21  9:27       ` KOSAKI Motohiro
2009-04-21  9:38         ` Johannes Weiner
2009-04-21  9:41           ` KOSAKI Motohiro
2009-04-22 20:37   ` Hugh Dickins
2009-04-27  7:46     ` Johannes Weiner
2009-04-20 23:36 ` [patch 1/3] mm: fix pageref leak in do_swap_page() Minchan Kim
2009-04-21  3:14 ` Balbir Singh
2009-04-21  8:19   ` Johannes Weiner
2009-04-21  8:45     ` Balbir Singh [this message]
2009-04-21  3:44 ` 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=20090421084558.GC19637@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).