lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: ext3 on latest -git: BUG: unable to handle kernel NULL pointer dereference at 0000000c
    On Thu, Jul 17, 2008 at 03:39:24PM +0200, Vegard Nossum wrote:
    > On Thu, Jul 17, 2008 at 3:34 PM, Josef Bacik <josef@toxicpanda.com> wrote:
    > >> Yeah, the full log exists at
    > >>
    > >> http://folk.uio.no/vegardno/linux/log-1216293934.txt
    > >>
    > >> I think this is the interesting part:
    > >
    > > Hmm well the journal should have aborted, but it looks like it didn't,
    > > are you mounting with errors=continue by any chance? Thanks much,
    >
    > No, this is the command I used:
    >
    > mount -o loop disk mnt
    >
    > I think this looks interesting:
    >
    > EXT3-fs error (device loop0) in ext3_reserve_inode_write: IO failure
    >
    > The code in ext3_reserve_inode_write() is here:
    >
    > err = ext3_journal_get_write_access(handle, iloc->bh);
    > if (err) {
    > brelse(iloc->bh);
    > iloc->bh = NULL;
    > }
    >
    > Maybe it should do something different here?
    >
    > But I don't know :-)
    >
    > Thanks for helping out!
    >
    >

    Can you try this patch out and see if it fixes the problem? I didn't compile
    test it, so you may need to tweak somethings, but it should work. Thanks,

    Signed-off-by: Josef Bacik <jbacik@redhat.com>


    Index: linux-2.6/fs/ext3/inode.c
    ===================================================================
    --- linux-2.6.orig/fs/ext3/inode.c
    +++ linux-2.6/fs/ext3/inode.c
    @@ -2023,13 +2023,27 @@ static void ext3_clear_blocks(handle_t *
    unsigned long count, __le32 *first, __le32 *last)
    {
    __le32 *p;
    + int ret;
    +
    if (try_to_extend_transaction(handle, inode)) {
    if (bh) {
    BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
    - ext3_journal_dirty_metadata(handle, bh);
    + ret = ext3_journal_dirty_metadata(handle, bh);
    + if (ret) {
    + ext3_std_error(inode->i_sb, ret);
    + return;
    + }
    }
    - ext3_mark_inode_dirty(handle, inode);
    - ext3_journal_test_restart(handle, inode);
    + ret = ext3_mark_inode_dirty(handle, inode);
    + if (ret)
    + return;
    +
    + ret = ext3_journal_test_restart(handle, inode);
    + if (ret) {
    + ext3_std_error(inode->i_sb, ret);
    + return;
    + }
    +
    if (bh) {
    BUFFER_TRACE(bh, "retaking write access");
    ext3_journal_get_write_access(handle, bh);

    \
     
     \ /
      Last update: 2008-07-17 16:21    [W:0.028 / U:0.616 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site