Showing error 1772

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


Source:

 671void fib6_force_start_gc(struct net *net)
 672{
 673        if (!timer_pending(&net->ipv6.ip6_fib_timer))
 674                mod_timer(&net->ipv6.ip6_fib_timer,
 675                          jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
 676}
 677
 678/*
 679 *        Add routing information to the routing tree.
 680 *        <destination addr>/<source addr>
 681 *        with source addr info in sub-trees
 682 */
 683
 684int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
 685{
 686        struct fib6_node *fn, *pn = NULL;
 687        int err = -ENOMEM;
 688
 689        fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr),
 690                        rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst));
 691
 692        if (fn == NULL)
 693                goto out;
 694
 695        pn = fn;
 696
 697#ifdef CONFIG_IPV6_SUBTREES
 698        if (rt->rt6i_src.plen) {
 699                struct fib6_node *sn;
 700
 701                if (fn->subtree == NULL) {
 702                        struct fib6_node *sfn;
 703
 704                        /*
 705                         * Create subtree.
 706                         *
 707                         *                fn[main tree]
 708                         *                |
 709                         *                sfn[subtree root]
 710                         *                   \
 711                         *                    sn[new leaf node]
Show full sources