Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 125707 Details for
Bug 183207
kernel BUG at fs/ext3/namei.c:384! invalid opcode: 0000 [#1]
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ext3-gracefully-handle-corrupt-htree.patch
ext3-gracefully-handle-corrupt-htree.patch (text/plain), 2.16 KB, created by
Duane Griffin
on 2007-07-22 23:14:36 UTC
(
hide
)
Description:
ext3-gracefully-handle-corrupt-htree.patch
Filename:
MIME Type:
Creator:
Duane Griffin
Created:
2007-07-22 23:14:36 UTC
Size:
2.16 KB
patch
obsolete
>Corrupt ext3 directory indexes can cause assertion failures and hence kernel BUGS. Instead of asserting on invalid data fail gracefully and fall back to a linear directory scan. > >See bug reports here: >http://bugzilla.kernel.org/show_bug.cgi?id=6628 >http://bugs.gentoo.org/show_bug.cgi?id=183207 >https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/109177 > >Signed-off-by: Duane Griffin <duaneg@dghda.com> > >Index: linux-2.6-git/fs/ext3/namei.c >=================================================================== >--- linux-2.6-git.orig/fs/ext3/namei.c >+++ linux-2.6-git/fs/ext3/namei.c >@@ -379,13 +379,25 @@ dx_probe(struct dentry *dentry, struct i > > entries = (struct dx_entry *) (((char *)&root->info) + > root->info.info_length); >- assert(dx_get_limit(entries) == dx_root_limit(dir, >- root->info.info_length)); >+ if (dx_get_limit(entries) != dx_root_limit(dir, >+ root->info.info_length)) { >+ ext3_warning(dir->i_sb, __FUNCTION__, "Invalid dx limit"); >+ brelse(bh); >+ *err = ERR_BAD_DX_DIR; >+ goto fail; >+ } >+ > dxtrace (printk("Look up %x", hash)); > while (1) > { > count = dx_get_count(entries); >- assert (count && count <= dx_get_limit(entries)); >+ if (!count || count > dx_get_limit(entries)) { >+ ext3_warning(dir->i_sb, __FUNCTION__, >+ "Invalid dx count"); >+ brelse(bh); >+ *err = ERR_BAD_DX_DIR; >+ goto fail2; >+ } > p = entries + 1; > q = entries + count - 1; > while (p <= q) >@@ -411,7 +423,11 @@ dx_probe(struct dentry *dentry, struct i > break; > } > } >- assert (at == p - 1); >+ if (at != p - 1) { >+ brelse(bh); >+ *err = ERR_BAD_DX_DIR; >+ goto fail2; >+ } > } > > at = p - 1; >@@ -423,8 +439,15 @@ dx_probe(struct dentry *dentry, struct i > if (!(bh = ext3_bread (NULL,dir, dx_get_block(at), 0, err))) > goto fail2; > at = entries = ((struct dx_node *) bh->b_data)->entries; >- assert (dx_get_limit(entries) == dx_node_limit (dir)); >+ if (dx_get_limit(entries) != dx_node_limit (dir)) { >+ ext3_warning(dir->i_sb, __FUNCTION__, >+ "Invalid dx limit"); >+ brelse(bh); >+ *err = ERR_BAD_DX_DIR; >+ goto fail2; >+ } > frame++; >+ frame->bh = NULL; > } > fail2: > while (frame >= frame_in) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 183207
: 125707 |
125708