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>] [day] [month] [year] [list]
Date:	Mon, 24 Aug 2015 09:17:00 -0400
From:	Trond Myklebust <trond.myklebust@...marydata.com>
To:	Nicholas Krause <xerofoify@...il.com>
Cc:	Anna Schumaker <anna.schumaker@...app.com>,
	Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nfs:Fix error handling in the function nfs_vm_page_mkwrite

On Sat, Aug 22, 2015 at 6:34 PM, Nicholas Krause <xerofoify@...il.com> wrote:
> This fixes error handling in the function nfs_vm_page_mkwrite to
> properly check if the function wait_on_bit_action returned something
> other then zero as if so return to the caller of nfs_vm_page_mkwrite
> to signal that a internal failure has occurred when calling this
> function and should be handled by the caller.
>
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
>  fs/nfs/file.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> index cc4fa1e..698851a 100644
> --- a/fs/nfs/file.c
> +++ b/fs/nfs/file.c
> @@ -612,8 +612,10 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
>         /* make sure the cache has finished storing the page */
>         nfs_fscache_wait_on_page_write(NFS_I(inode), page);
>
> -       wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING,
> -                       nfs_wait_bit_killable, TASK_KILLABLE);
> +       ret = wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING,
> +                                nfs_wait_bit_killable, TASK_KILLABLE);
> +       if (ret)
> +               goto out;
>
>         lock_page(page);
>         mapping = page_file_mapping(page);
> --
> 2.1.4
>

nfs_vm_page_mkwrite() is only allowed to return the value '0' or one
or more of the VM_FAULT_* flags. It may not return kernel error
values.

Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ