diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_sysctl.c | 2 | ||||
-rw-r--r-- | ipc/mqueue.c | 2 | ||||
-rw-r--r-- | ipc/shm.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 4a7a12c95abe..40eab7314aeb 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c | |||
@@ -26,7 +26,7 @@ static void *get_ipc(ctl_table *table) | |||
26 | return which; | 26 | return which; |
27 | } | 27 | } |
28 | 28 | ||
29 | #ifdef CONFIG_PROC_FS | 29 | #ifdef CONFIG_PROC_SYSCTL |
30 | static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp, | 30 | static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp, |
31 | void __user *buffer, size_t *lenp, loff_t *ppos) | 31 | void __user *buffer, size_t *lenp, loff_t *ppos) |
32 | { | 32 | { |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index a8ddadbc7459..916785363f0f 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -602,7 +602,7 @@ static struct file *do_create(struct dentry *dir, struct dentry *dentry, | |||
602 | dentry->d_fsdata = attr; | 602 | dentry->d_fsdata = attr; |
603 | } | 603 | } |
604 | 604 | ||
605 | mode &= ~current->fs->umask; | 605 | mode &= ~current_umask(); |
606 | ret = mnt_want_write(mqueue_mnt); | 606 | ret = mnt_want_write(mqueue_mnt); |
607 | if (ret) | 607 | if (ret) |
608 | goto out; | 608 | goto out; |
@@ -555,12 +555,14 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss, | |||
555 | in_use = shm_ids(ns).in_use; | 555 | in_use = shm_ids(ns).in_use; |
556 | 556 | ||
557 | for (total = 0, next_id = 0; total < in_use; next_id++) { | 557 | for (total = 0, next_id = 0; total < in_use; next_id++) { |
558 | struct kern_ipc_perm *ipc; | ||
558 | struct shmid_kernel *shp; | 559 | struct shmid_kernel *shp; |
559 | struct inode *inode; | 560 | struct inode *inode; |
560 | 561 | ||
561 | shp = idr_find(&shm_ids(ns).ipcs_idr, next_id); | 562 | ipc = idr_find(&shm_ids(ns).ipcs_idr, next_id); |
562 | if (shp == NULL) | 563 | if (ipc == NULL) |
563 | continue; | 564 | continue; |
565 | shp = container_of(ipc, struct shmid_kernel, shm_perm); | ||
564 | 566 | ||
565 | inode = shp->shm_file->f_path.dentry->d_inode; | 567 | inode = shp->shm_file->f_path.dentry->d_inode; |
566 | 568 | ||