diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
| commit | bb799d3b980eb803ca2da4a4eefbd9308f8d988a (patch) | |
| tree | 69fbe0cd6d47b23a50f5e1d87bf7489532fae149 /include/net | |
| parent | 919fc6e34831d1c2b58bfb5ae261dc3facc9b269 (diff) | |
| parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
Merge tag 'v3.13-rc4' into core/locking
Merge Linux 3.13-rc4, to refresh this rather old tree with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/genetlink.h | 8 | ||||
| -rw-r--r-- | include/net/ip.h | 2 | ||||
| -rw-r--r-- | include/net/ipv6.h | 9 | ||||
| -rw-r--r-- | include/net/ping.h | 3 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 7 | ||||
| -rw-r--r-- | include/net/sock.h | 6 |
6 files changed, 16 insertions, 19 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index ace4abf118d7..1b177ed803b7 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
| @@ -265,7 +265,7 @@ static inline int genlmsg_multicast_netns(struct genl_family *family, | |||
| 265 | struct net *net, struct sk_buff *skb, | 265 | struct net *net, struct sk_buff *skb, |
| 266 | u32 portid, unsigned int group, gfp_t flags) | 266 | u32 portid, unsigned int group, gfp_t flags) |
| 267 | { | 267 | { |
| 268 | if (group >= family->n_mcgrps) | 268 | if (WARN_ON_ONCE(group >= family->n_mcgrps)) |
| 269 | return -EINVAL; | 269 | return -EINVAL; |
| 270 | group = family->mcgrp_offset + group; | 270 | group = family->mcgrp_offset + group; |
| 271 | return nlmsg_multicast(net->genl_sock, skb, portid, group, flags); | 271 | return nlmsg_multicast(net->genl_sock, skb, portid, group, flags); |
| @@ -283,9 +283,6 @@ static inline int genlmsg_multicast(struct genl_family *family, | |||
| 283 | struct sk_buff *skb, u32 portid, | 283 | struct sk_buff *skb, u32 portid, |
| 284 | unsigned int group, gfp_t flags) | 284 | unsigned int group, gfp_t flags) |
| 285 | { | 285 | { |
| 286 | if (group >= family->n_mcgrps) | ||
| 287 | return -EINVAL; | ||
| 288 | group = family->mcgrp_offset + group; | ||
| 289 | return genlmsg_multicast_netns(family, &init_net, skb, | 286 | return genlmsg_multicast_netns(family, &init_net, skb, |
| 290 | portid, group, flags); | 287 | portid, group, flags); |
| 291 | } | 288 | } |
| @@ -387,6 +384,9 @@ static inline struct sk_buff *genlmsg_new(size_t payload, gfp_t flags) | |||
| 387 | static inline int genl_set_err(struct genl_family *family, struct net *net, | 384 | static inline int genl_set_err(struct genl_family *family, struct net *net, |
| 388 | u32 portid, u32 group, int code) | 385 | u32 portid, u32 group, int code) |
| 389 | { | 386 | { |
| 387 | if (WARN_ON_ONCE(group >= family->n_mcgrps)) | ||
| 388 | return -EINVAL; | ||
| 389 | group = family->mcgrp_offset + group; | ||
| 390 | return netlink_set_err(net->genl_sock, portid, group, code); | 390 | return netlink_set_err(net->genl_sock, portid, group, code); |
| 391 | } | 391 | } |
| 392 | 392 | ||
diff --git a/include/net/ip.h b/include/net/ip.h index 217bc5bfc6c6..5a25f36fe3a7 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -473,7 +473,7 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname, | |||
| 473 | int ip_ra_control(struct sock *sk, unsigned char on, | 473 | int ip_ra_control(struct sock *sk, unsigned char on, |
| 474 | void (*destructor)(struct sock *)); | 474 | void (*destructor)(struct sock *)); |
| 475 | 475 | ||
| 476 | int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); | 476 | int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len); |
| 477 | void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, | 477 | void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, |
| 478 | u32 info, u8 *payload); | 478 | u32 info, u8 *payload); |
| 479 | void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, | 479 | void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 2a5f668cd683..488316e339a1 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -110,7 +110,8 @@ struct frag_hdr { | |||
| 110 | __be32 identification; | 110 | __be32 identification; |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | #define IP6_MF 0x0001 | 113 | #define IP6_MF 0x0001 |
| 114 | #define IP6_OFFSET 0xFFF8 | ||
| 114 | 115 | ||
| 115 | #include <net/sock.h> | 116 | #include <net/sock.h> |
| 116 | 117 | ||
| @@ -776,8 +777,10 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
| 776 | 777 | ||
| 777 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); | 778 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); |
| 778 | 779 | ||
| 779 | int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); | 780 | int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, |
| 780 | int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); | 781 | int *addr_len); |
| 782 | int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len, | ||
| 783 | int *addr_len); | ||
| 781 | void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, | 784 | void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, |
| 782 | u32 info, u8 *payload); | 785 | u32 info, u8 *payload); |
| 783 | void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); | 786 | void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); |
diff --git a/include/net/ping.h b/include/net/ping.h index 3f67704f3747..90f48417b03d 100644 --- a/include/net/ping.h +++ b/include/net/ping.h | |||
| @@ -31,7 +31,8 @@ | |||
| 31 | 31 | ||
| 32 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ | 32 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ |
| 33 | struct pingv6_ops { | 33 | struct pingv6_ops { |
| 34 | int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len); | 34 | int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len, |
| 35 | int *addr_len); | ||
| 35 | int (*ip6_datagram_recv_ctl)(struct sock *sk, struct msghdr *msg, | 36 | int (*ip6_datagram_recv_ctl)(struct sock *sk, struct msghdr *msg, |
| 36 | struct sk_buff *skb); | 37 | struct sk_buff *skb); |
| 37 | int (*icmpv6_err_convert)(u8 type, u8 code, int *err); | 38 | int (*icmpv6_err_convert)(u8 type, u8 code, int *err); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 2174d8da0770..67b5d0068273 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -629,6 +629,7 @@ struct sctp_chunk { | |||
| 629 | #define SCTP_NEED_FRTX 0x1 | 629 | #define SCTP_NEED_FRTX 0x1 |
| 630 | #define SCTP_DONT_FRTX 0x2 | 630 | #define SCTP_DONT_FRTX 0x2 |
| 631 | __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ | 631 | __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ |
| 632 | resent:1, /* Has this chunk ever been resent. */ | ||
| 632 | has_tsn:1, /* Does this chunk have a TSN yet? */ | 633 | has_tsn:1, /* Does this chunk have a TSN yet? */ |
| 633 | has_ssn:1, /* Does this chunk have a SSN yet? */ | 634 | has_ssn:1, /* Does this chunk have a SSN yet? */ |
| 634 | singleton:1, /* Only chunk in the packet? */ | 635 | singleton:1, /* Only chunk in the packet? */ |
| @@ -1725,12 +1726,6 @@ struct sctp_association { | |||
| 1725 | /* How many duplicated TSNs have we seen? */ | 1726 | /* How many duplicated TSNs have we seen? */ |
| 1726 | int numduptsns; | 1727 | int numduptsns; |
| 1727 | 1728 | ||
| 1728 | /* Number of seconds of idle time before an association is closed. | ||
| 1729 | * In the association context, this is really used as a boolean | ||
| 1730 | * since the real timeout is stored in the timeouts array | ||
| 1731 | */ | ||
| 1732 | __u32 autoclose; | ||
| 1733 | |||
| 1734 | /* These are to support | 1729 | /* These are to support |
| 1735 | * "SCTP Extensions for Dynamic Reconfiguration of IP Addresses | 1730 | * "SCTP Extensions for Dynamic Reconfiguration of IP Addresses |
| 1736 | * and Enforcement of Flow and Message Limits" | 1731 | * and Enforcement of Flow and Message Limits" |
diff --git a/include/net/sock.h b/include/net/sock.h index e3a18ff0c38b..2ef3c3eca47a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1035,7 +1035,6 @@ enum cg_proto_flags { | |||
| 1035 | }; | 1035 | }; |
| 1036 | 1036 | ||
| 1037 | struct cg_proto { | 1037 | struct cg_proto { |
| 1038 | void (*enter_memory_pressure)(struct sock *sk); | ||
| 1039 | struct res_counter memory_allocated; /* Current allocated memory. */ | 1038 | struct res_counter memory_allocated; /* Current allocated memory. */ |
| 1040 | struct percpu_counter sockets_allocated; /* Current number of sockets. */ | 1039 | struct percpu_counter sockets_allocated; /* Current number of sockets. */ |
| 1041 | int memory_pressure; | 1040 | int memory_pressure; |
| @@ -1155,8 +1154,7 @@ static inline void sk_leave_memory_pressure(struct sock *sk) | |||
| 1155 | struct proto *prot = sk->sk_prot; | 1154 | struct proto *prot = sk->sk_prot; |
| 1156 | 1155 | ||
| 1157 | for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) | 1156 | for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) |
| 1158 | if (cg_proto->memory_pressure) | 1157 | cg_proto->memory_pressure = 0; |
| 1159 | cg_proto->memory_pressure = 0; | ||
| 1160 | } | 1158 | } |
| 1161 | 1159 | ||
| 1162 | } | 1160 | } |
| @@ -1171,7 +1169,7 @@ static inline void sk_enter_memory_pressure(struct sock *sk) | |||
| 1171 | struct proto *prot = sk->sk_prot; | 1169 | struct proto *prot = sk->sk_prot; |
| 1172 | 1170 | ||
| 1173 | for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) | 1171 | for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) |
| 1174 | cg_proto->enter_memory_pressure(sk); | 1172 | cg_proto->memory_pressure = 1; |
| 1175 | } | 1173 | } |
| 1176 | 1174 | ||
| 1177 | sk->sk_prot->enter_memory_pressure(sk); | 1175 | sk->sk_prot->enter_memory_pressure(sk); |
