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] [day] [month] [year] [list]
Message-ID: <1493233499.2326.1.camel@primarydata.com>
Date:   Wed, 26 Apr 2017 19:05:02 +0000
From:   Trond Myklebust <trondmy@...marydata.com>
To:     "anna.schumaker@...app.com" <anna.schumaker@...app.com>,
        Trond Myklebust <trondmy@...marydata.com>,
        "fabf@...net.be" <fabf@...net.be>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>
Subject: Re: [PATCH V2 linux-next] nfs: kmap can't fail

On Wed, 2017-04-26 at 20:45 +0200, Fabian Frederick wrote:
> Remove NULL test on kmap()
> 
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
> V2: Remove ptr and return kmap(page) directly
> (Suggested by Anna Schumaker)
> 
>  fs/nfs/dir.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 3a188cb..12ed806b 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -175,13 +175,9 @@ typedef struct {
>  static
>  struct nfs_cache_array *nfs_readdir_get_array(struct page *page)
>  {
> -	void *ptr;
>  	if (page == NULL)
>  		return ERR_PTR(-EIO);
> -	ptr = kmap(page);
> -	if (ptr == NULL)
> -		return ERR_PTR(-ENOMEM);
> -	return ptr;
> +	return kmap(page);
>  }
>  
>  static

There seems little value in having a wrapper to kmap... Can we perhaps
instead just get rid of both nfs_readdir_get_array and
nfs_readdir_release_array?

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@...marydata.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ