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]
Date:	Wed, 3 Mar 2010 09:01:15 +0100
From:	Jan Kara <jack@...e.cz>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-ext4@...r.kernel.org, jack@...e.cz
Subject: Re: [PATCH] ext3: add writepage sanity checks

On Tue 02-03-10 15:51:02, Dmitry Monakhov wrote:
> - There is theoretical possibility to perform writepage on
>    RO superblock. Add explicit check for what case.
> - Page must being locked before writepage.
  Thanks. Merged into my tree.

								Honza
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
> ---
>  fs/ext3/inode.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
> index 8ac4acf..14d40a4 100644
> --- a/fs/ext3/inode.c
> +++ b/fs/ext3/inode.c
> @@ -1528,6 +1528,7 @@ static int ext3_ordered_writepage(struct page *page,
>  	int err;
>  
>  	J_ASSERT(PageLocked(page));
> +	WARN_ON_ONCE(IS_RDONLY(inode));
>  
>  	/*
>  	 * We give up here if we're reentered, because it might be for a
> @@ -1600,6 +1601,9 @@ static int ext3_writeback_writepage(struct page *page,
>  	int ret = 0;
>  	int err;
>  
> +	J_ASSERT(PageLocked(page));
> +	WARN_ON_ONCE(IS_RDONLY(inode));
> +
>  	if (ext3_journal_current_handle())
>  		goto out_fail;
>  
> @@ -1642,6 +1646,9 @@ static int ext3_journalled_writepage(struct page *page,
>  	int ret = 0;
>  	int err;
>  
> +	J_ASSERT(PageLocked(page));
> +	WARN_ON_ONCE(IS_RDONLY(inode));
> +
>  	if (ext3_journal_current_handle())
>  		goto no_write;
>  
> -- 
> 1.6.6
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ