Showing error 1901

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


Source:

453                err = route4_set_parms(tp, base, f, handle, head, tb,
454                        tca[TCA_RATE], 0);
455                if (err < 0)
456                        return err;
457
458                goto reinsert;
459        }
460
461        err = -ENOBUFS;
462        if (head == NULL) {
463                head = kzalloc(sizeof(struct route4_head), GFP_KERNEL);
464                if (head == NULL)
465                        goto errout;
466
467                tcf_tree_lock(tp);
468                tp->root = head;
469                tcf_tree_unlock(tp);
470        }
471
472        f = kzalloc(sizeof(struct route4_filter), GFP_KERNEL);
473        if (f == NULL)
474                goto errout;
475
476        err = route4_set_parms(tp, base, f, handle, head, tb,
477                tca[TCA_RATE], 1);
478        if (err < 0)
479                goto errout;
480
481reinsert:
482        h = from_hash(f->handle >> 16);
483        for (fp = &f->bkt->ht[h]; (f1=*fp) != NULL; fp = &f1->next)
484                if (f->handle < f1->handle)
485                        break;
486
487        f->next = f1;
488        tcf_tree_lock(tp);
489        *fp = f;
490
491        if (old_handle && f->handle != old_handle) {
492                th = to_hash(old_handle);
493                h = from_hash(old_handle >> 16);
Show full sources