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: | mm/mmap.c |
Line in file: | 660 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
Stanse (1.2) |
Entered: | 2012-03-04 17:07:06 UTC |
630 */ 631 __insert_vm_struct(mm, insert); 632 } 633 634 if (anon_vma) 635 spin_unlock(&anon_vma->lock); 636 if (mapping) 637 spin_unlock(&mapping->i_mmap_lock); 638 639 if (remove_next) { 640 if (file) { 641 fput(file); 642 if (next->vm_flags & VM_EXECUTABLE) 643 removed_exe_file_vma(mm); 644 } 645 mm->map_count--; 646 mpol_put(vma_policy(next)); 647 kmem_cache_free(vm_area_cachep, next); 648 /* 649 * In mprotect's case 6 (see comments on vma_merge), 650 * we must remove another next too. It would clutter 651 * up the code too much to do both in one go. 652 */ 653 if (remove_next == 2) { 654 next = vma->vm_next; 655 goto again; 656 } 657 } 658 659 validate_mm(mm); 660} 661 662/* 663 * If the vma has a ->close operation then the driver probably needs to release 664 * per-vma resources, so we don't attempt to merge those. 665 */ 666static inline int is_mergeable_vma(struct vm_area_struct *vma, 667 struct file *file, unsigned long vm_flags) 668{ 669 if (vma->vm_flags != vm_flags) 670 return 0;