Showing error 1750

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/ext4/namei.c
Line in file: 1190
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 20:24:52 UTC


Source:

1160                        struct dx_hash_info *hinfo, int *error)
1161{
1162        unsigned blocksize = dir->i_sb->s_blocksize;
1163        unsigned count, continued;
1164        struct buffer_head *bh2;
1165        ext4_lblk_t newblock;
1166        u32 hash2;
1167        struct dx_map_entry *map;
1168        char *data1 = (*bh)->b_data, *data2;
1169        unsigned split, move, size, i;
1170        struct ext4_dir_entry_2 *de = NULL, *de2;
1171        int        err = 0;
1172
1173        bh2 = ext4_append (handle, dir, &newblock, &err);
1174        if (!(bh2)) {
1175                brelse(*bh);
1176                *bh = NULL;
1177                goto errout;
1178        }
1179
1180        BUFFER_TRACE(*bh, "get_write_access");
1181        err = ext4_journal_get_write_access(handle, *bh);
1182        if (err)
1183                goto journal_error;
1184
1185        BUFFER_TRACE(frame->bh, "get_write_access");
1186        err = ext4_journal_get_write_access(handle, frame->bh);
1187        if (err)
1188                goto journal_error;
1189
1190        data2 = bh2->b_data;
1191
1192        /* create map in the end of data2 block */
1193        map = (struct dx_map_entry *) (data2 + blocksize);
1194        count = dx_make_map((struct ext4_dir_entry_2 *) data1,
1195                             blocksize, hinfo, map);
1196        map -= count;
1197        dx_sort_map(map, count);
1198        /* Split the existing block in the middle, size-wise */
1199        size = 0;
1200        move = 0;
Show full sources