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: | 534 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
504#ifdef CONFIG_X86_64 505 if (address >= (unsigned long)__va(1UL<<32) && 506 address < (unsigned long)__va(max_pfn_mapped << PAGE_SHIFT)) 507 split_page_count(level); 508#endif 509 510 /* 511 * Install the new, split up pagetable. Important details here: 512 * 513 * On Intel the NX bit of all levels must be cleared to make a 514 * page executable. See section 4.13.2 of Intel 64 and IA-32 515 * Architectures Software Developer's Manual). 516 * 517 * Mark the entry present. The current mapping might be 518 * set to not present, which we preserved above. 519 */ 520 ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte))); 521 pgprot_val(ref_prot) |= _PAGE_PRESENT; 522 __set_pmd_pte(kpte, address, mk_pte(base, ref_prot)); 523 base = NULL; 524 525out_unlock: 526 /* 527 * If we dropped out via the lookup_address check under 528 * pgd_lock then stick the page back into the pool: 529 */ 530 if (base) 531 __free_page(base); 532 spin_unlock_irqrestore(&pgd_lock, flags); 533 534 return 0; 535} 536 537static int __change_page_attr(struct cpa_data *cpa, int primary) 538{ 539 unsigned long address; 540 int do_split, err; 541 unsigned int level; 542 pte_t *kpte, old_pte; 543 544 if (cpa->flags & CPA_ARRAY)