aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 9553ed006042..6c5d9dcc9030 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, 0); 807 audit_inode(name->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, 0); 827 audit_inode(name->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;