aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c6049e947cd9..79f24a969cb4 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -63,6 +63,7 @@ generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
63 * ->private_lock (__free_pte->__set_page_dirty_buffers) 63 * ->private_lock (__free_pte->__set_page_dirty_buffers)
64 * ->swap_lock (exclusive_swap_page, others) 64 * ->swap_lock (exclusive_swap_page, others)
65 * ->mapping->tree_lock 65 * ->mapping->tree_lock
66 * ->zone.lock
66 * 67 *
67 * ->i_mutex 68 * ->i_mutex
68 * ->i_mmap_lock (truncate->unmap_mapping_range) 69 * ->i_mmap_lock (truncate->unmap_mapping_range)
@@ -1626,12 +1627,18 @@ int __remove_suid(struct dentry *dentry, int kill)
1626 1627
1627int remove_suid(struct dentry *dentry) 1628int remove_suid(struct dentry *dentry)
1628{ 1629{
1629 int kill = should_remove_suid(dentry); 1630 int killsuid = should_remove_suid(dentry);
1631 int killpriv = security_inode_need_killpriv(dentry);
1632 int error = 0;
1630 1633
1631 if (unlikely(kill)) 1634 if (killpriv < 0)
1632 return __remove_suid(dentry, kill); 1635 return killpriv;
1636 if (killpriv)
1637 error = security_inode_killpriv(dentry);
1638 if (!error && killsuid)
1639 error = __remove_suid(dentry, killsuid);
1633 1640
1634 return 0; 1641 return error;
1635} 1642}
1636EXPORT_SYMBOL(remove_suid); 1643EXPORT_SYMBOL(remove_suid);
1637 1644