aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 6b97e2466fad..71a3ca18c873 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -772,7 +772,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
772{ 772{
773 struct path path; 773 struct path path;
774 struct file *filp; 774 struct file *filp;
775 char *name; 775 struct filename *name;
776 struct mq_attr attr; 776 struct mq_attr attr;
777 int fd, error; 777 int fd, error;
778 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; 778 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
@@ -795,7 +795,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
795 ro = mnt_want_write(mnt); /* we'll drop it in any case */ 795 ro = mnt_want_write(mnt); /* we'll drop it in any case */
796 error = 0; 796 error = 0;
797 mutex_lock(&root->d_inode->i_mutex); 797 mutex_lock(&root->d_inode->i_mutex);
798 path.dentry = lookup_one_len(name, root, strlen(name)); 798 path.dentry = lookup_one_len(name->name, root, strlen(name->name));
799 if (IS_ERR(path.dentry)) { 799 if (IS_ERR(path.dentry)) {
800 error = PTR_ERR(path.dentry); 800 error = PTR_ERR(path.dentry);
801 goto out_putfd; 801 goto out_putfd;
@@ -804,7 +804,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
804 804
805 if (oflag & O_CREAT) { 805 if (oflag & O_CREAT) {
806 if (path.dentry->d_inode) { /* entry already exists */ 806 if (path.dentry->d_inode) { /* entry already exists */
807 audit_inode(name, path.dentry); 807 audit_inode(name, path.dentry, 0);
808 if (oflag & O_EXCL) { 808 if (oflag & O_EXCL) {
809 error = -EEXIST; 809 error = -EEXIST;
810 goto out; 810 goto out;
@@ -824,7 +824,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
824 error = -ENOENT; 824 error = -ENOENT;
825 goto out; 825 goto out;
826 } 826 }
827 audit_inode(name, path.dentry); 827 audit_inode(name, path.dentry, 0);
828 filp = do_open(&path, oflag); 828 filp = do_open(&path, oflag);
829 } 829 }
830 830
@@ -849,7 +849,7 @@ out_putname:
849SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name) 849SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
850{ 850{
851 int err; 851 int err;
852 char *name; 852 struct filename *name;
853 struct dentry *dentry; 853 struct dentry *dentry;
854 struct inode *inode = NULL; 854 struct inode *inode = NULL;
855 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; 855 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
@@ -863,7 +863,8 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
863 if (err) 863 if (err)
864 goto out_name; 864 goto out_name;
865 mutex_lock_nested(&mnt->mnt_root->d_inode->i_mutex, I_MUTEX_PARENT); 865 mutex_lock_nested(&mnt->mnt_root->d_inode->i_mutex, I_MUTEX_PARENT);
866 dentry = lookup_one_len(name, mnt->mnt_root, strlen(name)); 866 dentry = lookup_one_len(name->name, mnt->mnt_root,
867 strlen(name->name));
867 if (IS_ERR(dentry)) { 868 if (IS_ERR(dentry)) {
868 err = PTR_ERR(dentry); 869 err = PTR_ERR(dentry);
869 goto out_unlock; 870 goto out_unlock;
@@ -978,7 +979,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
978 goto out_fput; 979 goto out_fput;
979 } 980 }
980 info = MQUEUE_I(inode); 981 info = MQUEUE_I(inode);
981 audit_inode(NULL, f.file->f_path.dentry); 982 audit_inode(NULL, f.file->f_path.dentry, 0);
982 983
983 if (unlikely(!(f.file->f_mode & FMODE_WRITE))) { 984 if (unlikely(!(f.file->f_mode & FMODE_WRITE))) {
984 ret = -EBADF; 985 ret = -EBADF;
@@ -1094,7 +1095,7 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
1094 goto out_fput; 1095 goto out_fput;
1095 } 1096 }
1096 info = MQUEUE_I(inode); 1097 info = MQUEUE_I(inode);
1097 audit_inode(NULL, f.file->f_path.dentry); 1098 audit_inode(NULL, f.file->f_path.dentry, 0);
1098 1099
1099 if (unlikely(!(f.file->f_mode & FMODE_READ))) { 1100 if (unlikely(!(f.file->f_mode & FMODE_READ))) {
1100 ret = -EBADF; 1101 ret = -EBADF;