Showing error 1014

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: arch/x86/mm/pageattr.c
Line in file: 471
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 441                /*
 442                 * The address is aligned and the number of pages
 443                 * covers the full page.
 444                 */
 445                new_pte = pfn_pte(pte_pfn(old_pte), canon_pgprot(new_prot));
 446                __set_pmd_pte(kpte, address, new_pte);
 447                cpa->flags |= CPA_FLUSHTLB;
 448                do_split = 0;
 449        }
 450
 451out_unlock:
 452        spin_unlock_irqrestore(&pgd_lock, flags);
 453
 454        return do_split;
 455}
 456
 457static int split_large_page(pte_t *kpte, unsigned long address)
 458{
 459        unsigned long flags, pfn, pfninc = 1;
 460        unsigned int i, level;
 461        pte_t *pbase, *tmp;
 462        pgprot_t ref_prot;
 463        struct page *base;
 464
 465        if (!debug_pagealloc)
 466                spin_unlock(&cpa_lock);
 467        base = alloc_pages(GFP_KERNEL, 0);
 468        if (!debug_pagealloc)
 469                spin_lock(&cpa_lock);
 470        if (!base)
 471                return -ENOMEM;
 472
 473        spin_lock_irqsave(&pgd_lock, flags);
 474        /*
 475         * Check for races, another CPU might have split this page
 476         * up for us already:
 477         */
 478        tmp = lookup_address(address, &level);
 479        if (tmp != kpte)
 480                goto out_unlock;
 481
Show full sources