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: <alpine.LFD.2.20.1611070156420.21293@casper.infradead.org>
Date:   Mon, 7 Nov 2016 01:56:56 +0000 (GMT)
From:   James Simmons <jsimmons@...radead.org>
To:     Oleg Drokin <green@...uxhacker.ru>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org,
        Andreas Dilger <andreas.dilger@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Lustre Development List <lustre-devel@...ts.lustre.org>,
        Jinshan Xiong <jinshan.xiong@...el.com>
Subject: Re: [PATCH 13/14] staging/lustre/llite: do not clear uptodate bit
 in page delete


> From: Jinshan Xiong <jinshan.xiong@...el.com>
> 
> Otherwise, if the race between page fault and truncate occurs, it
> will cause the page fault routine to return an EIO error.
> 
> In filemap_fault() {
>     page_not_uptodate:
>     ...
>         ClearPageError(page);
>         error = mapping->a_ops->readpage(file, page);
>         if (!error) {
>                 wait_on_page_locked(page);
>                 if (!PageUptodate(page))
>                         error = -EIO;
>     }
>     ...
> }
> 
> However, I tend to think this is a defect in kernel implementation,
> because it assumes PageUptodate shouldn't be cleared but file read
> routine doesn't make the same assumption.

Reviewed-by: James Simmons <jsimmons@...radead.org>
 
> Signed-off-by: Jinshan Xiong <jinshan.xiong@...el.com>
> Reviewed-on: http://review.whamcloud.com/22827
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8633
> Reviewed-by: Li Dongyang <dongyang.li@....edu.au>
> Reviewed-by: Bobi Jam <bobijam@...mail.com>
> Signed-off-by: Oleg Drokin <green@...uxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/llite/vvp_page.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c
> index 25490a5..23d6630 100644
> --- a/drivers/staging/lustre/lustre/llite/vvp_page.c
> +++ b/drivers/staging/lustre/lustre/llite/vvp_page.c
> @@ -166,7 +166,6 @@ static void vvp_page_delete(const struct lu_env *env,
>  	refc = atomic_dec_return(&page->cp_ref);
>  	LASSERTF(refc >= 1, "page = %p, refc = %d\n", page, refc);
>  
> -	ClearPageUptodate(vmpage);
>  	ClearPagePrivate(vmpage);
>  	vmpage->private = 0;
>  	/*
> -- 
> 2.7.4
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ