aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 52e5abbc41db..5f72767ddd9b 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -88,11 +88,17 @@ out:
88#ifdef CONFIG_NET 88#ifdef CONFIG_NET
89static int kobj_bcast_filter(struct sock *dsk, struct sk_buff *skb, void *data) 89static int kobj_bcast_filter(struct sock *dsk, struct sk_buff *skb, void *data)
90{ 90{
91 struct kobject *kobj = data; 91 struct kobject *kobj = data, *ksobj;
92 const struct kobj_ns_type_operations *ops; 92 const struct kobj_ns_type_operations *ops;
93 93
94 ops = kobj_ns_ops(kobj); 94 ops = kobj_ns_ops(kobj);
95 if (ops) { 95 if (!ops && kobj->kset) {
96 ksobj = &kobj->kset->kobj;
97 if (ksobj->parent != NULL)
98 ops = kobj_ns_ops(ksobj->parent);
99 }
100
101 if (ops && ops->netlink_ns && kobj->ktype->namespace) {
96 const void *sock_ns, *ns; 102 const void *sock_ns, *ns;
97 ns = kobj->ktype->namespace(kobj); 103 ns = kobj->ktype->namespace(kobj);
98 sock_ns = ops->netlink_ns(dsk); 104 sock_ns = ops->netlink_ns(dsk);