if (po->running) {
rcu_read_unlock();
+ /* prevents packet_notifier() from calling
+ * register_prot_hook()
+ */
+ po->num = 0;
__unregister_prot_hook(sk, true);
rcu_read_lock();
dev_curr = po->prot_hook.dev;
unlisted = !dev_get_by_index_rcu(sock_net(sk),
dev->ifindex);
}
+ BUG_ON(po->running);
po->num = protocol;
po->prot_hook.type = protocol;