projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b031661
)
bluetooth: fix race in bt_procfs_init()
author
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 4 Apr 2013 23:16:06 +0000
(19:16 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 9 Apr 2013 18:13:36 +0000
(14:13 -0400)
use proc_create_data() rather than set ->data after the file has
been created
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
net/bluetooth/af_bluetooth.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/af_bluetooth.c
b/net/bluetooth/af_bluetooth.c
index 68e6fefb365581786a46a20cf3b1ae4681436bd7..438a8c56938e7f8162055f0c3310855838be993e 100644
(file)
--- a/
net/bluetooth/af_bluetooth.c
+++ b/
net/bluetooth/af_bluetooth.c
@@
-638,16
+638,10
@@
int bt_procfs_init(struct net *net, const char *name,
struct bt_sock_list* sk_list,
int (* seq_show)(struct seq_file *, void *))
{
- struct proc_dir_entry * pde;
-
sk_list->custom_seq_show = seq_show;
- pde = proc_create(name, 0, net->proc_net, &bt_fops);
- if (!pde)
+ if (!proc_create_data(name, 0, net->proc_net, &bt_fops, sk_list))
return -ENOMEM;
-
- pde->data = sk_list;
-
return 0;
}