diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2024-02-01 14:33:26 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-01 15:12:37 -0800 |
| commit | cf244463a286ea57ea7e63c33614d302f776e62e (patch) | |
| tree | caa068596cbfea621376822e30ab545c6516b2c7 /include/net | |
| parent | cacfd6bfc381ce0e71dfb4ab902ca0fb0e1abe0f (diff) | |
| parent | 41b9fb381a486360b2daaec0c7480f8e3ff72bc7 (diff) | |
| download | linux-cf244463a286ea57ea7e63c33614d302f776e62e.tar.gz linux-cf244463a286ea57ea7e63c33614d302f776e62e.tar.bz2 linux-cf244463a286ea57ea7e63c33614d302f776e62e.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts or adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/af_unix.h | 20 | ||||
| -rw-r--r-- | include/net/ip.h | 2 | ||||
| -rw-r--r-- | include/net/netfilter/nf_tables.h | 2 |
3 files changed, 17 insertions, 7 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 54e346152eb1..627ea8e2d915 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h @@ -54,12 +54,6 @@ struct scm_stat { #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) -#define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) -#define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock) -#define unix_state_lock_nested(s) \ - spin_lock_nested(&unix_sk(s)->lock, \ - SINGLE_DEPTH_NESTING) - /* The AF_UNIX socket */ struct unix_sock { /* WARNING: sk has to be the first member */ @@ -85,6 +79,20 @@ struct unix_sock { #define unix_sk(ptr) container_of_const(ptr, struct unix_sock, sk) #define unix_peer(sk) (unix_sk(sk)->peer) +#define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) +#define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock) +enum unix_socket_lock_class { + U_LOCK_NORMAL, + U_LOCK_SECOND, /* for double locking, see unix_state_double_lock(). */ + U_LOCK_DIAG, /* used while dumping icons, see sk_diag_dump_icons(). */ +}; + +static inline void unix_state_lock_nested(struct sock *sk, + enum unix_socket_lock_class subclass) +{ + spin_lock_nested(&unix_sk(sk)->lock, subclass); +} + #define peer_wait peer_wq.wait long unix_inq_len(struct sock *sk); diff --git a/include/net/ip.h b/include/net/ip.h index de0c69c57e3c..25cb688bdc62 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -767,7 +767,7 @@ int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev); * Functions provided by ip_sockglue.c */ -void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb); +void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb, bool drop_dst); void ip_cmsg_recv_offset(struct msghdr *msg, struct sock *sk, struct sk_buff *skb, int tlen, int offset); int ip_cmsg_send(struct sock *sk, struct msghdr *msg, diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index ac7c94d3648e..f3a7c4b1dd63 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1357,6 +1357,7 @@ void nft_obj_notify(struct net *net, const struct nft_table *table, * @type: stateful object numeric type * @owner: module owner * @maxattr: maximum netlink attribute + * @family: address family for AF-specific object types * @policy: netlink attribute policy */ struct nft_object_type { @@ -1366,6 +1367,7 @@ struct nft_object_type { struct list_head list; u32 type; unsigned int maxattr; + u8 family; struct module *owner; const struct nla_policy *policy; }; |
