rtnetlink.c (8e8c668927b029f6ccc350eb1aa936864cc4eb6f) rtnetlink.c (1b5c5493e3e68181be344cb51bf9df192d05ffc2)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 57 unchanged lines hidden (view full) ---

66static DEFINE_MUTEX(rtnl_mutex);
67
68void rtnl_lock(void)
69{
70 mutex_lock(&rtnl_mutex);
71}
72EXPORT_SYMBOL(rtnl_lock);
73
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 57 unchanged lines hidden (view full) ---

66static DEFINE_MUTEX(rtnl_mutex);
67
68void rtnl_lock(void)
69{
70 mutex_lock(&rtnl_mutex);
71}
72EXPORT_SYMBOL(rtnl_lock);
73
74static struct sk_buff *defer_kfree_skb_list;
75void rtnl_kfree_skbs(struct sk_buff *head, struct sk_buff *tail)
76{
77 if (head && tail) {
78 tail->next = defer_kfree_skb_list;
79 defer_kfree_skb_list = head;
80 }
81}
82EXPORT_SYMBOL(rtnl_kfree_skbs);
83
74void __rtnl_unlock(void)
75{
84void __rtnl_unlock(void)
85{
86 struct sk_buff *head = defer_kfree_skb_list;
87
88 defer_kfree_skb_list = NULL;
89
76 mutex_unlock(&rtnl_mutex);
90 mutex_unlock(&rtnl_mutex);
91
92 while (head) {
93 struct sk_buff *next = head->next;
94
95 kfree_skb(head);
96 cond_resched();
97 head = next;
98 }
77}
78
79void rtnl_unlock(void)
80{
81 /* This fellow will unlock it for us. */
82 netdev_run_todo();
83}
84EXPORT_SYMBOL(rtnl_unlock);

--- 3713 unchanged lines hidden ---
99}
100
101void rtnl_unlock(void)
102{
103 /* This fellow will unlock it for us. */
104 netdev_run_todo();
105}
106EXPORT_SYMBOL(rtnl_unlock);

--- 3713 unchanged lines hidden ---