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: <2384708.1628685015@warthog.procyon.org.uk>
Date:   Wed, 11 Aug 2021 13:30:15 +0100
From:   David Howells <dhowells@...hat.com>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     dhowells@...hat.com, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v14 079/138] mm/filemap: Add readahead_folio()

Matthew Wilcox (Oracle) <willy@...radead.org> wrote:

> +/**
> + * readahead_folio - Get the next folio to read.
> + * @ractl: The current readahead request.
> + *
> + * Context: The folio is locked.  The caller should unlock the folio once
> + * all I/O to that folio has completed.
> + * Return: A pointer to the next folio, or %NULL if we are done.
> + */
> +static inline struct folio *readahead_folio(struct readahead_control *ractl)
> +{
> +	struct folio *folio = __readahead_folio(ractl);
>  
> -	return page;
> +	folio_put(folio);

This will oops if __readahead_folio() returns NULL.

> +	return folio;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ