Re: [reiserfs-dev] [PATCH] corrupted reiserfs may cause kernel to panic on lookup() sometimes.

From: Oleg Drokin (green@namesys.com)
Date: Mon Jan 14 2002 - 00:56:56 EST


Hello!

On Fri, Jan 11, 2002 at 12:46:26PM -0500, Chris Mason wrote:

> > Certain disk corruptions and i/o errors may cause lookup() to panic,
> > which is wrong. This patch fixes the problem.
> > Please apply.
> Hmmm, none of the callers of reiserfs_find_entry have been changed to check
> for IO_ERROR. We should at least change reiserfs_add_entry to check for
> IO_ERROR, so it doesn't try to create a name after getting io error during
> the lookup.
Well, in fact reiserfs_add_entry won't do that anyway, consider this code:
    retval = reiserfs_find_entry (dir, name, namelen, &path, &de);
    if( retval != NAME_NOT_FOUND ) {
        if (buffer != small_buf)
            reiserfs_kfree (buffer, buflen, dir->i_sb);
        pathrelse (&path);

        if (retval != NAME_FOUND) {
            reiserfs_warning ("zam-7002:" __FUNCTION__ ": \"reiserfs_find_entry\" has returned"
                              " unexpected value (%d)\n", retval);
       }

        return -EEXIST;
    }

Though I see other places where code is not that smart. I'll come up with additional patch later today.
Thanks for noticing.

Bye,
    Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:43 EST