From: wangdi Date: Wed, 23 Apr 2003 10:54:14 +0000 (+0000) Subject: add ext3-use-after-free-hp-2.4.19.patch X-Git-Tag: v1_7_100~1^92~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=36cbebf9d0aba9ae34e2932f0e5f2135832e075c;p=fs%2Flustre-release.git add ext3-use-after-free-hp-2.4.19.patch --- diff --git a/lustre/kernel_patches/patches/ext3-use-after-free-hp-2.4.19.patch b/lustre/kernel_patches/patches/ext3-use-after-free-hp-2.4.19.patch new file mode 100644 index 0000000..cc2e873 --- /dev/null +++ b/lustre/kernel_patches/patches/ext3-use-after-free-hp-2.4.19.patch @@ -0,0 +1,53 @@ +./fs/ext3/namei.c | 11 +++++------ +1 files changed, 5 insertions(+), 6 deletions(-) + +--- linux-2.4.19-hp3_pnnl1/./fs/ext3/namei.c~ext3-use-after-free-chaos 2003-04-10 21:39:30.000000000 +0800 ++++ linux-2.4.19-hp3_pnnl1-root/./fs/ext3/namei.c 2003-04-10 21:48:48.000000000 +0800 +@@ -1523,8 +1523,11 @@ static int ext3_add_nondir(handle_t *han + { + int err = ext3_add_entry(handle, dentry, inode); + if (!err) { +- d_instantiate(dentry, inode); +- return 0; ++ err = ext3_mark_inode_dirty(handle, inode); ++ if (err == 0) { ++ d_instantiate(dentry, inode); ++ return 0; ++ } + } + ext3_dec_count(handle, inode); + iput(inode); +@@ -1560,7 +1563,6 @@ static int ext3_create (struct inode * d + inode->i_op = &ext3_file_inode_operations; + inode->i_fop = &ext3_file_operations; + inode->i_mapping->a_ops = &ext3_aops; +- ext3_mark_inode_dirty(handle, inode); + err = ext3_add_nondir(handle, dentry, inode); + } + ext3_journal_stop(handle, dir); +@@ -1587,7 +1589,6 @@ static int ext3_mknod (struct inode * di + err = PTR_ERR(inode); + if (!IS_ERR(inode)) { + init_special_inode(inode, mode, rdev); +- ext3_mark_inode_dirty(handle, inode); + err = ext3_add_nondir(handle, dentry, inode); + } + ext3_journal_stop(handle, dir); +@@ -2037,7 +2038,6 @@ static int ext3_symlink (struct inode * + } + EXT3_I(inode)->i_disksize = inode->i_size; + err = ext3_add_nondir(handle, dentry, inode); +- ext3_mark_inode_dirty(handle, inode); + out_stop: + ext3_journal_stop(handle, dir); + return err; +@@ -2071,7 +2071,6 @@ static int ext3_link (struct dentry * ol + ext3_inc_count(handle, inode); + atomic_inc(&inode->i_count); + +- ext3_mark_inode_dirty(handle, inode); + err = ext3_add_nondir(handle, dentry, inode); + ext3_journal_stop(handle, dir); + return err; + +_