diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mqueue.c | 2 | ||||
-rw-r--r-- | ipc/shm.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index ee9d69707c0a..c79bd57353e7 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/nsproxy.h> | 32 | #include <linux/nsproxy.h> |
33 | #include <linux/pid.h> | 33 | #include <linux/pid.h> |
34 | #include <linux/ipc_namespace.h> | 34 | #include <linux/ipc_namespace.h> |
35 | #include <linux/ima.h> | ||
36 | 35 | ||
37 | #include <net/sock.h> | 36 | #include <net/sock.h> |
38 | #include "util.h" | 37 | #include "util.h" |
@@ -734,7 +733,6 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode, | |||
734 | error = PTR_ERR(filp); | 733 | error = PTR_ERR(filp); |
735 | goto out_putfd; | 734 | goto out_putfd; |
736 | } | 735 | } |
737 | ima_counts_get(filp); | ||
738 | 736 | ||
739 | fd_install(fd, filp); | 737 | fd_install(fd, filp); |
740 | goto out_upsem; | 738 | goto out_upsem; |
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/nsproxy.h> | 39 | #include <linux/nsproxy.h> |
40 | #include <linux/mount.h> | 40 | #include <linux/mount.h> |
41 | #include <linux/ipc_namespace.h> | 41 | #include <linux/ipc_namespace.h> |
42 | #include <linux/ima.h> | ||
43 | 42 | ||
44 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
45 | 44 | ||
@@ -879,8 +878,8 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | |||
879 | if (err) | 878 | if (err) |
880 | goto out_unlock; | 879 | goto out_unlock; |
881 | 880 | ||
882 | path.dentry = dget(shp->shm_file->f_path.dentry); | 881 | path = shp->shm_file->f_path; |
883 | path.mnt = shp->shm_file->f_path.mnt; | 882 | path_get(&path); |
884 | shp->shm_nattch++; | 883 | shp->shm_nattch++; |
885 | size = i_size_read(path.dentry->d_inode); | 884 | size = i_size_read(path.dentry->d_inode); |
886 | shm_unlock(shp); | 885 | shm_unlock(shp); |
@@ -890,13 +889,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | |||
890 | if (!sfd) | 889 | if (!sfd) |
891 | goto out_put_dentry; | 890 | goto out_put_dentry; |
892 | 891 | ||
893 | file = alloc_file(path.mnt, path.dentry, f_mode, | 892 | file = alloc_file(&path, f_mode, |
894 | is_file_hugepages(shp->shm_file) ? | 893 | is_file_hugepages(shp->shm_file) ? |
895 | &shm_file_operations_huge : | 894 | &shm_file_operations_huge : |
896 | &shm_file_operations); | 895 | &shm_file_operations); |
897 | if (!file) | 896 | if (!file) |
898 | goto out_free; | 897 | goto out_free; |
899 | ima_counts_get(file); | ||
900 | 898 | ||
901 | file->private_data = sfd; | 899 | file->private_data = sfd; |
902 | file->f_mapping = shp->shm_file->f_mapping; | 900 | file->f_mapping = shp->shm_file->f_mapping; |
@@ -951,7 +949,7 @@ out_unlock: | |||
951 | out_free: | 949 | out_free: |
952 | kfree(sfd); | 950 | kfree(sfd); |
953 | out_put_dentry: | 951 | out_put_dentry: |
954 | dput(path.dentry); | 952 | path_put(&path); |
955 | goto out_nattch; | 953 | goto out_nattch; |
956 | } | 954 | } |
957 | 955 | ||