~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to mm/nommu.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings, Bastian Blank, Ben Hutchings, Uwe Kleine-König
  • Date: 2012-03-04 15:32:20 UTC
  • mfrom: (1.3.14)
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20120304153220-zbhqnmufx18yk6q4
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.8
  - [i386] i387: move TS_USEDFPU flag from thread_info to task_struct
  - [x86] additional refactoring of FPU/SSE state save and restore
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.9
  - vfs: fix d_inode_lookup() dentry ref leak
  - target: Allow control CDBs with data > 1 page
  - epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
  - epoll: ep_unregister_pollwait() can use the freed pwq->whead
  - epoll: limit paths (CVE-2011-1083)
  - cdrom: use copy_to_user() without the underscores

[ Bastian Blank ]
* [mips,mipsel] Also remove ext4 modules from installer.

[ Ben Hutchings ]
* Update debconf template translations:
  - Update Dutch (Willem Kuyn) (Closes: #658736)
  - Add Polish (Michał Kułach) (Closes: #658912)
* Bump ABI to 2
* fs: Introduce and enable security restrictions on links:
  - Do not follow symlinks in /tmp that are owned by other users
    (sysctl: fs.protected_symlinks)
  - Do not allow unprivileged users to create hard links to sensitive files
    (sysctl: fs.protected_hardlinks) (Closes: #609455)
    + This breaks the 'at' package in stable, which will be fixed shortly
      (see #597130)
  The precise restrictions are specified in Documentation/sysctl/fs.txt in
  the linux-doc-3.2 and linux-source-3.2 packages.
* iwlwifi: fix key removal (Closes: #651199)
* cgroups: Set CGROUP_PERF
* hid: Enable HID_HOLTEK, HID_PRIMAX, HID_SPEEDLINK, HID_WIIMOTE as modules,
  HID_ACRUX_FF
* media/rc: Enable RC_ATI_REMOTE as module
* gspca: Enable USB_GSPCA_TOPRO as module
* dvb-usb: Enable DVB_USB_PCTV452E, DVB_USB_MXL111SF as modules

[ Uwe Kleine-König ]
* [x86] Update rt featureset to 3.2.9-rt15

Show diffs side-by-side

added added

removed removed

Lines of Context:
696
696
        if (vma->vm_file) {
697
697
                mapping = vma->vm_file->f_mapping;
698
698
 
 
699
                mutex_lock(&mapping->i_mmap_mutex);
699
700
                flush_dcache_mmap_lock(mapping);
700
701
                vma_prio_tree_insert(vma, &mapping->i_mmap);
701
702
                flush_dcache_mmap_unlock(mapping);
 
703
                mutex_unlock(&mapping->i_mmap_mutex);
702
704
        }
703
705
 
704
706
        /* add the VMA to the tree */
760
762
        if (vma->vm_file) {
761
763
                mapping = vma->vm_file->f_mapping;
762
764
 
 
765
                mutex_lock(&mapping->i_mmap_mutex);
763
766
                flush_dcache_mmap_lock(mapping);
764
767
                vma_prio_tree_remove(vma, &mapping->i_mmap);
765
768
                flush_dcache_mmap_unlock(mapping);
 
769
                mutex_unlock(&mapping->i_mmap_mutex);
766
770
        }
767
771
 
768
772
        /* remove from the MM's tree and list */
2052
2056
        high = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
2053
2057
 
2054
2058
        down_write(&nommu_region_sem);
 
2059
        mutex_lock(&inode->i_mapping->i_mmap_mutex);
2055
2060
 
2056
2061
        /* search for VMAs that fall within the dead zone */
2057
2062
        vma_prio_tree_foreach(vma, &iter, &inode->i_mapping->i_mmap,
2059
2064
                /* found one - only interested if it's shared out of the page
2060
2065
                 * cache */
2061
2066
                if (vma->vm_flags & VM_SHARED) {
 
2067
                        mutex_unlock(&inode->i_mapping->i_mmap_mutex);
2062
2068
                        up_write(&nommu_region_sem);
2063
2069
                        return -ETXTBSY; /* not quite true, but near enough */
2064
2070
                }
2086
2092
                }
2087
2093
        }
2088
2094
 
 
2095
        mutex_unlock(&inode->i_mapping->i_mmap_mutex);
2089
2096
        up_write(&nommu_region_sem);
2090
2097
        return 0;
2091
2098
}