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: <Y71qNeLNeiBB5a/+@casper.infradead.org>
Date:   Tue, 10 Jan 2023 13:37:57 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] mm: compaction: Remove redundant VM_BUG_ON() in
 compact_zone()

On Tue, Jan 10, 2023 at 09:36:18PM +0800, Baolin Wang wrote:
> The compaction_suitable() will never return values other than COMPACT_SUCCESS,
> COMPACT_SKIPPED and COMPACT_CONTINUE, so after validation of COMPACT_SUCCESS
> and COMPACT_SKIPPED, we will never hit other unexpected case. Thus remove
> the redundant VM_BUG_ON() validation for the return values of compaction_suitable().

I don't understand why we'd remove this check.

> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
>  mm/compaction.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 62a61de44658..5e6f5e35748d 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2313,9 +2313,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>  	if (ret == COMPACT_SUCCESS || ret == COMPACT_SKIPPED)
>  		return ret;
>  
> -	/* huh, compaction_suitable is returning something unexpected */
> -	VM_BUG_ON(ret != COMPACT_CONTINUE);
> -
>  	/*
>  	 * Clear pageblock skip if there were failures recently and compaction
>  	 * is about to be retried after being deferred.
> -- 
> 2.27.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ