hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/net/af_unix.h
....@@ -14,7 +14,7 @@
1414 void unix_gc(void);
1515 void wait_for_unix_gc(void);
1616 struct sock *unix_get_socket(struct file *filp);
17
-struct sock *unix_peer_get(struct sock *);
17
+struct sock *unix_peer_get(struct sock *sk);
1818
1919 #define UNIX_HASH_SIZE 256
2020 #define UNIX_HASH_BITS 8
....@@ -27,7 +27,7 @@
2727 refcount_t refcnt;
2828 int len;
2929 unsigned int hash;
30
- struct sockaddr_un name[0];
30
+ struct sockaddr_un name[];
3131 };
3232
3333 struct unix_skb_parms {
....@@ -41,7 +41,11 @@
4141 u32 consumed;
4242 } __randomize_layout;
4343
44
-#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
44
+struct scm_stat {
45
+ atomic_t nr_fds;
46
+};
47
+
48
+#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
4549
4650 #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock)
4751 #define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock)
....@@ -53,7 +57,7 @@
5357 struct unix_sock {
5458 /* WARNING: sk has to be the first member */
5559 struct sock sk;
56
- struct unix_address *addr;
60
+ struct unix_address *addr;
5761 struct path path;
5862 struct mutex iolock, bindlock;
5963 struct sock *peer;
....@@ -64,7 +68,8 @@
6468 #define UNIX_GC_CANDIDATE 0
6569 #define UNIX_GC_MAYBE_CYCLE 1
6670 struct socket_wq peer_wq;
67
- wait_queue_entry_t peer_wake;
71
+ wait_queue_entry_t peer_wake;
72
+ struct scm_stat scm_stat;
6873 };
6974
7075 static inline struct unix_sock *unix_sk(const struct sock *sk)