Showing error 1876

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/reiserfs/ibalance.c
Line in file: 845
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 815                        bi.tb = tb;
 816                        bi.bi_bh = tb->L[h];
 817                        bi.bi_parent = tb->FL[h];
 818                        bi.bi_position = get_left_neighbor_position(tb, h);
 819                        internal_insert_childs(&bi,
 820                                               /*tb->L[h], tb->S[h-1]->b_next */
 821                                               n + child_pos + 1,
 822                                               insert_num, insert_key,
 823                                               insert_ptr);
 824
 825                        insert_num = 0;
 826                } else {
 827                        struct disk_child *dc;
 828
 829                        /* some items fall into L[h] or CFL[h], but some don't fall */
 830                        internal_shift1_left(tb, h, child_pos + 1);
 831                        /* calculate number of new items that fall into L[h] */
 832                        k = tb->lnum[h] - child_pos - 1;
 833                        bi.tb = tb;
 834                        bi.bi_bh = tb->L[h];
 835                        bi.bi_parent = tb->FL[h];
 836                        bi.bi_position = get_left_neighbor_position(tb, h);
 837                        internal_insert_childs(&bi,
 838                                               /*tb->L[h], tb->S[h-1]->b_next, */
 839                                               n + child_pos + 1, k,
 840                                               insert_key, insert_ptr);
 841
 842                        replace_lkey(tb, h, insert_key + k);
 843
 844                        /* replace the first node-ptr in S[h] by node-ptr to insert_ptr[k] */
 845                        dc = B_N_CHILD(tbSh, 0);
 846                        put_dc_size(dc,
 847                                    MAX_CHILD_SIZE(insert_ptr[k]) -
 848                                    B_FREE_SPACE(insert_ptr[k]));
 849                        put_dc_block_number(dc, insert_ptr[k]->b_blocknr);
 850
 851                        do_balance_mark_internal_dirty(tb, tbSh, 0);
 852
 853                        k++;
 854                        insert_key += k;
 855                        insert_ptr += k;
Show full sources