diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 01:02:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 08:06:20 -0700 |
commit | 6a6375db13703b42dd51b28576d444bb73c541b9 (patch) | |
tree | 87ad672479234d5c6773b1f22522dd2eda244c30 /ipc | |
parent | 79da3664f61640057041bf172b1457e2d1969330 (diff) | |
download | op-kernel-dev-6a6375db13703b42dd51b28576d444bb73c541b9.zip op-kernel-dev-6a6375db13703b42dd51b28576d444bb73c541b9.tar.gz |
sysvipc: use non-racy method for proc entries creation
Use proc_create_data() to make sure that ->proc_fops and ->data be setup
before gluing PDE to main tree.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/util.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -165,13 +165,12 @@ void __init ipc_init_proc_interface(const char *path, const char *header, iface->ids = ids; iface->show = show; - pde = create_proc_entry(path, - S_IRUGO, /* world readable */ - NULL /* parent dir */); - if (pde) { - pde->data = iface; - pde->proc_fops = &sysvipc_proc_fops; - } else { + pde = proc_create_data(path, + S_IRUGO, /* world readable */ + NULL, /* parent dir */ + &sysvipc_proc_fops, + iface); + if (!pde) { kfree(iface); } } |