Lines Matching +full:sub +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0-only
28 struct list_head node; /* on one of subscriber lists */ member
51 list_for_each_entry_safe(cur, p2, &subscriber_array[e], node) { in vmci_event_exit()
59 list_del(&cur->node); in vmci_event_exit()
74 list_for_each_entry(cur, &subscriber_array[e], node) { in event_find()
75 if (cur->id == sub_id) in event_find()
94 sanitized_event = array_index_nospec(event_msg->event_data.event, max_vmci_event); in event_deliver()
96 list_for_each_entry_rcu(cur, subscriber_list, node) { in event_deliver()
97 cur->callback(cur->id, &event_msg->event_data, in event_deliver()
98 cur->callback_data); in event_deliver()
111 if (msg->payload_size < sizeof(u32) || in vmci_event_dispatch()
112 msg->payload_size > sizeof(struct vmci_event_data_max)) in vmci_event_dispatch()
115 if (!VMCI_EVENT_VALID(event_msg->event_data.event)) in vmci_event_dispatch()
123 * vmci_event_subscribe() - Subscribe to a given event.
138 struct vmci_subscription *sub; in vmci_event_subscribe() local
154 sub = kzalloc(sizeof(*sub), GFP_KERNEL); in vmci_event_subscribe()
155 if (!sub) in vmci_event_subscribe()
158 sub->id = VMCI_EVENT_MAX; in vmci_event_subscribe()
159 sub->event = event; in vmci_event_subscribe()
160 sub->callback = callback; in vmci_event_subscribe()
161 sub->callback_data = callback_data; in vmci_event_subscribe()
162 INIT_LIST_HEAD(&sub->node); in vmci_event_subscribe()
176 sub->id = subscription_id; in vmci_event_subscribe()
183 list_add_rcu(&sub->node, &subscriber_array[event]); in vmci_event_subscribe()
191 *new_subscription_id = sub->id; in vmci_event_subscribe()
197 * vmci_event_unsubscribe() - unsubscribe from an event.
210 list_del_rcu(&s->node); in vmci_event_unsubscribe()