User: | Jiri Slaby |
Error type: | Double Lock |
Error type description: | Some lock is locked twice unintentionally in a sequence |
File location: | mm/mmap.c |
Line in file: | 553 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
Stanse (1.2) |
Entered: | 2012-02-27 21:22:42 UTC |
523 * perhaps the one after too (mprotect case 6). 524 */ 525again: remove_next = 1 + (end > next->vm_end); 526 end = next->vm_end; 527 anon_vma = next->anon_vma; 528 importer = vma; 529 } else if (end > next->vm_start) { 530 /* 531 * vma expands, overlapping part of the next: 532 * mprotect case 5 shifting the boundary up. 533 */ 534 adjust_next = (end - next->vm_start) >> PAGE_SHIFT; 535 anon_vma = next->anon_vma; 536 importer = vma; 537 } else if (end < vma->vm_end) { 538 /* 539 * vma shrinks, and !insert tells it's not 540 * split_vma inserting another: so it must be 541 * mprotect case 4 shifting the boundary down. 542 */ 543 adjust_next = - ((vma->vm_end - end) >> PAGE_SHIFT); 544 anon_vma = next->anon_vma; 545 importer = next; 546 } 547 } 548 549 if (file) { 550 mapping = file->f_mapping; 551 if (!(vma->vm_flags & VM_NONLINEAR)) 552 root = &mapping->i_mmap; 553 spin_lock(&mapping->i_mmap_lock); 554 if (importer && 555 vma->vm_truncate_count != next->vm_truncate_count) { 556 /* 557 * unmap_mapping_range might be in progress: 558 * ensure that the expanding vma is rescanned. 559 */ 560 importer->vm_truncate_count = 0; 561 } 562 if (insert) { 563 insert->vm_truncate_count = vma->vm_truncate_count;