Showing error 554

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: mm/hugetlb.c
Line in file: 122
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

  92
  93                /* If this area reaches higher then extend our area to
  94                 * include it completely.  If this is not the first area
  95                 * which we intend to reuse, free it. */
  96                if (rg->to > t)
  97                        t = rg->to;
  98                if (rg != nrg) {
  99                        list_del(&rg->link);
 100                        kfree(rg);
 101                }
 102        }
 103        nrg->from = f;
 104        nrg->to = t;
 105        return 0;
 106}
 107
 108static long region_chg(struct list_head *head, long f, long t)
 109{
 110        struct file_region *rg, *nrg;
 111        long chg = 0;
 112
 113        /* Locate the region we are before or in. */
 114        list_for_each_entry(rg, head, link)
 115                if (f <= rg->to)
 116                        break;
 117
 118        /* If we are below the current region then a new region is required.
 119         * Subtle, allocate a new region at the position but make it zero
 120         * size such that we can guarantee to record the reservation. */
 121        if (&rg->link == head || t < rg->from) {
 122                nrg = kmalloc(sizeof(*nrg), GFP_KERNEL);
 123                if (!nrg)
 124                        return -ENOMEM;
 125                nrg->from = f;
 126                nrg->to   = f;
 127                INIT_LIST_HEAD(&nrg->link);
 128                list_add(&nrg->link, rg->link.prev);
 129
 130                return t - f;
 131        }
 132
Show full sources