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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Jan 2016 16:55:31 +0100
From:	Michal Hocko <mhocko@...nel.org>
To:	Vladimir Davydov <vdavydov@...tuozzo.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vmpressure: Fix subtree pressure detection

On Wed 27-01-16 19:28:57, Vladimir Davydov wrote:
> When vmpressure is called for the entire subtree under pressure we
> mistakenly use vmpressure->scanned instead of vmpressure->tree_scanned
> when checking if vmpressure work is to be scheduled. This results in
> suppressing all vmpressure events in the legacy cgroup hierarchy. Fix
> it.
> 
> Fixes: 8e8ae645249b ("mm: memcontrol: hook up vmpressure to socket pressure")
> Signed-off-by: Vladimir Davydov <vdavydov@...tuozzo.com>

a = b += c made me scratch my head for a second but this looks correct

Acked-by: Michal Hocko <mhocko@...e.com>

> ---
>  mm/vmpressure.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/vmpressure.c b/mm/vmpressure.c
> index 9a6c0704211c..149fdf6c5c56 100644
> --- a/mm/vmpressure.c
> +++ b/mm/vmpressure.c
> @@ -248,9 +248,8 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
>  
>  	if (tree) {
>  		spin_lock(&vmpr->sr_lock);
> -		vmpr->tree_scanned += scanned;
> +		scanned = vmpr->tree_scanned += scanned;
>  		vmpr->tree_reclaimed += reclaimed;
> -		scanned = vmpr->scanned;
>  		spin_unlock(&vmpr->sr_lock);
>  
>  		if (scanned < vmpressure_win)
> -- 
> 2.1.4

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ