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: <20101122175541.GD5012@quack.suse.cz>
Date:	Mon, 22 Nov 2010 18:55:41 +0100
From:	Jan Kara <jack@...e.cz>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ext3: Add journal error check into
 ext3_delete_entry()

On Fri 19-11-10 16:28:35, Namhyung Kim wrote:
> Check return value of ext3_journal_get_write_access() and
> ext3_journal_dirty_metadata().
  Thanks, merged.

								Honza

> 
> Signed-off-by: Namhyung Kim <namhyung@...il.com>
> ---
>  fs/ext3/namei.c |   14 ++++++++++++--
>  1 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
> index 03fccc5..672cea1 100644
> --- a/fs/ext3/namei.c
> +++ b/fs/ext3/namei.c
> @@ -1644,8 +1644,13 @@ static int ext3_delete_entry (handle_t *handle,
>  		if (!ext3_check_dir_entry("ext3_delete_entry", dir, de, bh, i))
>  			return -EIO;
>  		if (de == de_del)  {
> +			int err;
> +
>  			BUFFER_TRACE(bh, "get_write_access");
> -			ext3_journal_get_write_access(handle, bh);
> +			err = ext3_journal_get_write_access(handle, bh);
> +			if (err)
> +				goto journal_error;
> +
>  			if (pde)
>  				pde->rec_len = ext3_rec_len_to_disk(
>  					ext3_rec_len_from_disk(pde->rec_len) +
> @@ -1654,7 +1659,12 @@ static int ext3_delete_entry (handle_t *handle,
>  				de->inode = 0;
>  			dir->i_version++;
>  			BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
> -			ext3_journal_dirty_metadata(handle, bh);
> +			err = ext3_journal_dirty_metadata(handle, bh);
> +			if (err) {
> +journal_error:
> +				ext3_std_error(dir->i_sb, err);
> +				return err;
> +			}
>  			return 0;
>  		}
>  		i += ext3_rec_len_from_disk(de->rec_len);
> -- 
> 1.7.0.4
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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