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]
Message-Id: <201110171136.06619.dtor@vmware.com>
Date:	Mon, 17 Oct 2011 11:36:06 -0700
From:	Dmitry Torokhov <dtor@...are.com>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] drivers, vmw_balloon.c: Determine page allocation flag can_sleep outside loop.

On Monday, October 17, 2011 11:13:47 AM Rakib Mullick wrote:
>  In vmballoon_reserve_page function, flags has been passed from the
> callee function (vmballoon_inflate here). So, we can determine
> can_sleep outside the loop.
> 
> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>

Thanks Rakib.

Acked-by: Dmitry Torokhov <dtor@...are.com>

> ---
> 
> diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
> index 053d36c..6983d80 100644
> --- a/drivers/misc/vmw_balloon.c
> +++ b/drivers/misc/vmw_balloon.c
> @@ -412,6 +412,7 @@ static int vmballoon_reserve_page(struct vmballoon
> *b, bool can_sleep) gfp_t flags;
>  	unsigned int hv_status;
>  	bool locked = false;
> +	flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;
> 
>  	do {
>  		if (!can_sleep)
> @@ -419,7 +420,6 @@ static int vmballoon_reserve_page(struct vmballoon
> *b, bool can_sleep) else
>  			STATS_INC(b->stats.sleep_alloc);
> 
> -		flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : 
VMW_PAGE_ALLOC_NOSLEEP;
>  		page = alloc_page(flags);
>  		if (!page) {
>  			if (!can_sleep)
--
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