aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-13 21:54:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-13 21:54:50 -0400
commitdfe2c6dcc8ca2cdc662d7c0473e9811b72ef3370 (patch)
tree9ed639a08c16322cdf136d576f42df5b97cd1549 /ipc/util.c
parenta45d572841a24db02a62cf05e1157c35fdd3705b (diff)
parent64e455079e1bd7787cc47be30b7f601ce682a5f6 (diff)
Merge branch 'akpm' (patches from Andrew Morton)
Merge second patch-bomb from Andrew Morton: - a few hotfixes - drivers/dma updates - MAINTAINERS updates - Quite a lot of lib/ updates - checkpatch updates - binfmt updates - autofs4 - drivers/rtc/ - various small tweaks to less used filesystems - ipc/ updates - kernel/watchdog.c changes * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (135 commits) mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared kernel/param: consolidate __{start,stop}___param[] in <linux/moduleparam.h> ia64: remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] frv: remove unused declarations of __start___ex_table and __stop___ex_table kvm: ensure hard lockup detection is disabled by default kernel/watchdog.c: control hard lockup detection default staging: rtl8192u: use %*pEn to escape buffer staging: rtl8192e: use %*pEn to escape buffer staging: wlan-ng: use %*pEhp to print SN lib80211: remove unused print_ssid() wireless: hostap: proc: print properly escaped SSID wireless: ipw2x00: print SSID via %*pE wireless: libertas: print esaped string via %*pE lib/vsprintf: add %*pE[achnops] format specifier lib / string_helpers: introduce string_escape_mem() lib / string_helpers: refactoring the test suite lib / string_helpers: move documentation to c-file include/linux: remove strict_strto* definitions arch/x86/mm/numa.c: fix boot failure when all nodes are hotpluggable fs: check bh blocknr earlier when searching lru ...
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/ipc/util.c b/ipc/util.c
index d73b7af581e2..88adc329888c 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -892,28 +892,16 @@ static const struct seq_operations sysvipc_proc_seqops = {
892 892
893static int sysvipc_proc_open(struct inode *inode, struct file *file) 893static int sysvipc_proc_open(struct inode *inode, struct file *file)
894{ 894{
895 int ret;
896 struct seq_file *seq;
897 struct ipc_proc_iter *iter; 895 struct ipc_proc_iter *iter;
898 896
899 ret = -ENOMEM; 897 iter = __seq_open_private(file, &sysvipc_proc_seqops, sizeof(*iter));
900 iter = kmalloc(sizeof(*iter), GFP_KERNEL);
901 if (!iter) 898 if (!iter)
902 goto out; 899 return -ENOMEM;
903
904 ret = seq_open(file, &sysvipc_proc_seqops);
905 if (ret) {
906 kfree(iter);
907 goto out;
908 }
909
910 seq = file->private_data;
911 seq->private = iter;
912 900
913 iter->iface = PDE_DATA(inode); 901 iter->iface = PDE_DATA(inode);
914 iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); 902 iter->ns = get_ipc_ns(current->nsproxy->ipc_ns);
915out: 903
916 return ret; 904 return 0;
917} 905}
918 906
919static int sysvipc_proc_release(struct inode *inode, struct file *file) 907static int sysvipc_proc_release(struct inode *inode, struct file *file)