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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 29 Apr 2007 16:22:15 -0400
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Ethan Solomita <solo@...gle.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org
Subject: Re: NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?

On Fri, 2007-04-27 at 18:21 -0700, Ethan Solomita wrote:
> There are several places where we add together NR_UNSTABLE_FS and
> NF_FILE_DIRTY:
> 
> sync_inodes_sb()
> balance_dirty_pages()
> wakeup_pdflush()
> wb_kupdate()
> prefetch_suitable()
> 
>     I can trace a standard codepath where it seems both of these are set
> on the same page:
> 
> nfs_file_aops.commit_write ->
>     nfs_commit_write
>     nfs_updatepages
>     nfs_writepage_setup
>     nfs_wb_page
>     nfs_wb_page_priority
>     nfs_writepage_locked
>     nfs_flush_mapping
>     nfs_flush_list
>     nfs_flush_multi
>     nfs_write_partial_ops.rpc_call_done
>     nfs_writeback_done_partial
>     nfs_writepage_release
>     nfs_reschedule_unstable_write
>     nfs_mark_request_commit
>     incr NR_UNSTABLE_NFS
> 
> nfs_file_aops.commit_write ->
>     nfs_commit_write
>     nfs_updatepage
>     __set_page_dirty_nobuffers
>     incr NF_FILE_DIRTY
> 
> 
>     This is the standard code path that derives from sys_write(). Can
> someone either show how this code sequence can't happen, or confirm for
> me that there's a bug?
>     -- Ethan

It should not happen. If the page is on the unstable list, then it will
be committed before nfs_updatepage is allowed to redirty it. See the
recent fixes in 2.6.21-rc7.

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