Showing error 1674

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/xfs/xfs_log_recover.c
Line in file: 2276
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

2246{
2247        xfs_inode_log_format_t        *in_f;
2248        xfs_mount_t                *mp;
2249        xfs_buf_t                *bp;
2250        xfs_imap_t                imap;
2251        xfs_dinode_t                *dip;
2252        xfs_ino_t                ino;
2253        int                        len;
2254        xfs_caddr_t                src;
2255        xfs_caddr_t                dest;
2256        int                        error;
2257        int                        attr_index;
2258        uint                        fields;
2259        xfs_icdinode_t                *dicp;
2260        int                        need_free = 0;
2261
2262        if (pass == XLOG_RECOVER_PASS1) {
2263                return 0;
2264        }
2265
2266        if (item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_t)) {
2267                in_f = (xfs_inode_log_format_t *)item->ri_buf[0].i_addr;
2268        } else {
2269                in_f = (xfs_inode_log_format_t *)kmem_alloc(
2270                        sizeof(xfs_inode_log_format_t), KM_SLEEP);
2271                need_free = 1;
2272                error = xfs_inode_item_format_convert(&item->ri_buf[0], in_f);
2273                if (error)
2274                        goto error;
2275        }
2276        ino = in_f->ilf_ino;
2277        mp = log->l_mp;
2278        if (ITEM_TYPE(item) == XFS_LI_INODE) {
2279                imap.im_blkno = (xfs_daddr_t)in_f->ilf_blkno;
2280                imap.im_len = in_f->ilf_len;
2281                imap.im_boffset = in_f->ilf_boffset;
2282        } else {
2283                /*
2284                 * It's an old inode format record.  We don't know where
2285                 * its cluster is located on disk, and we can't allow
2286                 * xfs_imap() to figure it out because the inode btrees
Show full sources