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: <20230618043857.GA2417524@google.com>
Date:   Sun, 18 Jun 2023 13:38:57 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Domenico Cerasuolo <cerasuolodomenico@...il.com>
Cc:     vitaly.wool@...sulko.com, minchan@...nel.org,
        senozhatsky@...omium.org, yosryahmed@...gle.com,
        linux-mm@...ck.org, ddstreet@...e.org, sjenning@...hat.com,
        nphamcs@...il.com, hannes@...xchg.org, akpm@...ux-foundation.org,
        linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH v3 1/7] mm: zswap: add pool shrinking mechanism

On (23/06/12 11:38), Domenico Cerasuolo wrote:
> +static int zswap_reclaim_entry(struct zswap_pool *pool)
> +{
> +	struct zswap_header *zhdr;
> +	struct zswap_entry *entry;
> +	struct zswap_tree *tree;
> +	pgoff_t swpoffset;
> +	int ret;
> +
> +	/* Get an entry off the LRU */
> +	spin_lock(&pool->lru_lock);
> +	if (list_empty(&pool->lru)) {
> +		spin_unlock(&pool->lru_lock);
> +		return -EINVAL;
> +	}
> +	entry = list_last_entry(&pool->lru, struct zswap_entry, lru);
> +	list_del_init(&entry->lru);

A quick question: should we zswap_entry_get() here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ