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: <20210121184456.GB4127393@casper.infradead.org>
Date:   Thu, 21 Jan 2021 18:44:56 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Huang Ying <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Minchan Kim <minchan@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Johannes Weiner <hannes@...xchg.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Michal Hocko <mhocko@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] swap: Check nrexceptional of swap cache before being
 freed

On Wed, Jan 20, 2021 at 03:27:11PM +0800, Huang Ying wrote:
> To catch the error in updating the swap cache shadow entries or their count.

I just resent a patch that removes nrexceptional tracking.

Can you use !mapping_empty() instead?

>  void exit_swap_address_space(unsigned int type)
>  {
> -	kvfree(swapper_spaces[type]);
> +	int i;
> +	struct address_space *spaces = swapper_spaces[type];
> +
> +	for (i = 0; i < nr_swapper_spaces[type]; i++)
> +		VM_BUG_ON(spaces[i].nrexceptional);
> +	kvfree(spaces);
>  	nr_swapper_spaces[type] = 0;
>  	swapper_spaces[type] = NULL;
>  }
> -- 
> 2.29.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ