Commit fa7ff56f75add89bbedaf2dfcfa8f6661e8e8b3a

Authored by Pavel Emelyanov
Committed by David S. Miller
1 parent f65c1b534b

af_unix: Export stuff required for diag module

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 2 changed files with 9 additions and 3 deletions Side-by-side Diff

include/net/af_unix.h
... ... @@ -11,10 +11,13 @@
11 11 extern void unix_gc(void);
12 12 extern void wait_for_unix_gc(void);
13 13 extern struct sock *unix_get_socket(struct file *filp);
  14 +extern struct sock *unix_peer_get(struct sock *);
14 15  
15 16 #define UNIX_HASH_SIZE 256
16 17  
17 18 extern unsigned int unix_tot_inflight;
  19 +extern spinlock_t unix_table_lock;
  20 +extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
18 21  
19 22 struct unix_address {
20 23 atomic_t refcnt;
... ... @@ -115,8 +115,10 @@
115 115 #include <net/checksum.h>
116 116 #include <linux/security.h>
117 117  
118   -static struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
119   -static DEFINE_SPINLOCK(unix_table_lock);
  118 +struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
  119 +EXPORT_SYMBOL_GPL(unix_socket_table);
  120 +DEFINE_SPINLOCK(unix_table_lock);
  121 +EXPORT_SYMBOL_GPL(unix_table_lock);
120 122 static atomic_long_t unix_nr_socks;
121 123  
122 124 #define unix_sockets_unbound (&unix_socket_table[UNIX_HASH_SIZE])
... ... @@ -172,7 +174,7 @@
172 174 return skb_queue_len(&sk->sk_receive_queue) > sk->sk_max_ack_backlog;
173 175 }
174 176  
175   -static struct sock *unix_peer_get(struct sock *s)
  177 +struct sock *unix_peer_get(struct sock *s)
176 178 {
177 179 struct sock *peer;
178 180  
... ... @@ -183,6 +185,7 @@
183 185 unix_state_unlock(s);
184 186 return peer;
185 187 }
  188 +EXPORT_SYMBOL_GPL(unix_peer_get);
186 189  
187 190 static inline void unix_release_addr(struct unix_address *addr)
188 191 {