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]
Date:	Tue, 21 Apr 2009 10:19:03 +0200
From:	Johannes Weiner <hannes@...xchg.org>
To:	Balbir Singh <balbir@...ux.vnet.ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 1/3] mm: fix pageref leak in do_swap_page()

On Tue, Apr 21, 2009 at 08:44:20AM +0530, Balbir Singh wrote:
> * Johannes Weiner <hannes@...xchg.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@...xchg.org>
> > Cc: Balbir Singh <balbir@...ux.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.

> 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.
--
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