Showing error 246

User: Jiri Slaby
Error type: BUG/WARNING
Error type description: An unsatisfied assertion in the code
File location: mm/vmalloc.c
Line in file: 507
Project: Linux Kernel
Project version: 2.6.28
Tools: Web Crawler (0.1)
URL: https://bugzilla.kernel.org/show_bug.cgi?id=15723
Entered: 2011-09-08 08:33:42 UTC


Source:

 477        int nr = 0;
 478
 479        /*
 480         * If sync is 0 but force_flush is 1, we'll go sync anyway but callers
 481         * should not expect such behaviour. This just simplifies locking for
 482         * the case that isn't actually used at the moment anyway.
 483         */
 484        if (!sync && !force_flush) {
 485                if (!spin_trylock(&purge_lock))
 486                        return;
 487        } else
 488                spin_lock(&purge_lock);
 489
 490        rcu_read_lock();
 491        list_for_each_entry_rcu(va, &vmap_area_list, list) {
 492                if (va->flags & VM_LAZY_FREE) {
 493                        if (va->va_start < *start)
 494                                *start = va->va_start;
 495                        if (va->va_end > *end)
 496                                *end = va->va_end;
 497                        nr += (va->va_end - va->va_start) >> PAGE_SHIFT;
 498                        unmap_vmap_area(va);
 499                        list_add_tail(&va->purge_list, &valist);
 500                        va->flags |= VM_LAZY_FREEING;
 501                        va->flags &= ~VM_LAZY_FREE;
 502                }
 503        }
 504        rcu_read_unlock();
 505
 506        if (nr) {
 507                BUG_ON(nr > atomic_read(&vmap_lazy_nr));
 508                atomic_sub(nr, &vmap_lazy_nr);
 509        }
 510
 511        if (nr || force_flush)
 512                flush_tlb_kernel_range(*start, *end);
 513
 514        if (nr) {
 515                spin_lock(&vmap_area_lock);
 516                list_for_each_entry(va, &valist, purge_list)
 517                        __free_vmap_area(va);
Show full sources