* Pekka J Enberg <[EMAIL PROTECTED]> wrote:

>                       return ERR_PTR(-EACCES);
>               }
> +             if (is_bad_inode(inode)) {
> +                     unlock_kernel();
> +                     iput(inode);
> +                     return ERR_PTR(-ENOENT);
> +             }

fs/isofs/rock.c:474 parse_rock_ridge_inode_internal() seems buggy too:

                        reloc =
                            isofs_iget(inode->i_sb,
                                       ISOFS_I(inode)->i_first_extent,
                                       0);
                        if (!reloc)
                                goto out;

it should probably do "!reloc || is_bad_inode(inode)" as well.

and there are about 5 other callsites as well that only check for a NULL 
return.

perhaps the better fix would be to add this to inode.c:isofs_iget():

        if (inode && (inode->i_state & I_NEW)) {
                sb->s_op->read_inode(inode);
                unlock_new_inode(inode);
                if (s_bad_inode(inode))
                        inode = NULL;
        }

?

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to