aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 20:42:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 20:42:38 -0400
commitf9ca6a561d40115696a54f16085c4edb17effc74 (patch)
treefc1eae6489ac8792d3903e269a1685628023175b /net
parent9eb31227cbccd3a37da0f42604f1ab5fc556bc53 (diff)
parent87248d31d1055b56e01a62d9320b4e118bc84e0e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "This fixes some fallout from the net-next merge the other day, plus some non-merge-window-related bug fixes: 1) Fix sparse warnings in bcmgenet, systemport, b53, and mt7530 (Florian Fainelli) 2) pptp does a bogus dst_release() on a route we have a single refcount on, and attached to a socket, which needs that refcount (Eric Dumazet) 3) UDP connected sockets on ipv6 can race with route update handling, resulting in a pre-PMTU update route still stuck on the socket and thus continuing to get ICMPV6_PKT_TOOBIG errors. We end up never seeing the updated route. (Alexey Kodanev) 4) Missing list initializer(s) in TIPC (Jon Maloy) 5) Connect phy early to prevent crashes in lan78xx driver (Alexander Graf) 6) Fix build with modular NVMEM (Arnd Bergmann) 7) netdevsim canot mark nsim_devlink_net_ops and nsim_fib_net_ops as __net_initdata, as these are references from module unload unconditionally (Arnd Bergmann)" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (23 commits) netdevsim: remove incorrect __net_initdata annotations sfc: remove ctpio_dmabuf_start from stats inet: frags: fix ip6frag_low_thresh boundary tipc: Fix namespace violation in tipc_sk_fill_sock_diag net: avoid unneeded atomic operation in ip*_append_data() nvmem: disallow modular CONFIG_NVMEM net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES nfp: use full 40 bits of the NSP buffer address lan78xx: Connect phy early nfp: add a separate counter for packets with CHECKSUM_COMPLETE tipc: Fix missing list initializations in struct tipc_subscription ipv6: udp: set dst cache for a connected sk if current not valid ipv6: udp: convert 'connected' to bool type in udpv6_sendmsg() ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow() ipv6: add a wrapper for ip6_dst_store() with flowi6 checks net: phy: marvell10g: add thermal hwmon device pptp: remove a buggy dst release in pptp_connect() net: dsa: mt7530: Use NULL instead of plain integer net: dsa: b53: Fix sparse warnings in b53_mmap.c af_unix: remove redundant lockdep class ...
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/6lowpan/reassembly.c2
-rw-r--r--net/ipv4/ip_fragment.c5
-rw-r--r--net/ipv4/ip_output.c3
-rw-r--r--net/ipv6/datagram.c9
-rw-r--r--net/ipv6/ip6_output.c18
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c2
-rw-r--r--net/ipv6/ping.c2
-rw-r--r--net/ipv6/reassembly.c2
-rw-r--r--net/ipv6/route.c17
-rw-r--r--net/ipv6/udp.c31
-rw-r--r--net/rxrpc/input.c6
-rw-r--r--net/rxrpc/protocol.h6
-rw-r--r--net/tipc/socket.c3
-rw-r--r--net/tipc/subscr.c2
-rw-r--r--net/unix/af_unix.c10
15 files changed, 60 insertions, 58 deletions
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
index 44f148a6bb57..1790b65944b3 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -411,7 +411,6 @@ err:
411} 411}
412 412
413#ifdef CONFIG_SYSCTL 413#ifdef CONFIG_SYSCTL
414static long zero;
415 414
416static struct ctl_table lowpan_frags_ns_ctl_table[] = { 415static struct ctl_table lowpan_frags_ns_ctl_table[] = {
417 { 416 {
@@ -428,7 +427,6 @@ static struct ctl_table lowpan_frags_ns_ctl_table[] = {
428 .maxlen = sizeof(unsigned long), 427 .maxlen = sizeof(unsigned long),
429 .mode = 0644, 428 .mode = 0644,
430 .proc_handler = proc_doulongvec_minmax, 429 .proc_handler = proc_doulongvec_minmax,
431 .extra1 = &zero,
432 .extra2 = &init_net.ieee802154_lowpan.frags.high_thresh 430 .extra2 = &init_net.ieee802154_lowpan.frags.high_thresh
433 }, 431 },
434 { 432 {
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 994fa70a910f..8e9528ebaa8e 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -667,7 +667,7 @@ struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user)
667EXPORT_SYMBOL(ip_check_defrag); 667EXPORT_SYMBOL(ip_check_defrag);
668 668
669#ifdef CONFIG_SYSCTL 669#ifdef CONFIG_SYSCTL
670static long zero; 670static int dist_min;
671 671
672static struct ctl_table ip4_frags_ns_ctl_table[] = { 672static struct ctl_table ip4_frags_ns_ctl_table[] = {
673 { 673 {
@@ -684,7 +684,6 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
684 .maxlen = sizeof(unsigned long), 684 .maxlen = sizeof(unsigned long),
685 .mode = 0644, 685 .mode = 0644,
686 .proc_handler = proc_doulongvec_minmax, 686 .proc_handler = proc_doulongvec_minmax,
687 .extra1 = &zero,
688 .extra2 = &init_net.ipv4.frags.high_thresh 687 .extra2 = &init_net.ipv4.frags.high_thresh
689 }, 688 },
690 { 689 {
@@ -700,7 +699,7 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
700 .maxlen = sizeof(int), 699 .maxlen = sizeof(int),
701 .mode = 0644, 700 .mode = 0644,
702 .proc_handler = proc_dointvec_minmax, 701 .proc_handler = proc_dointvec_minmax,
703 .extra1 = &zero 702 .extra1 = &dist_min,
704 }, 703 },
705 { } 704 { }
706}; 705};
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 94cacae76aca..4c11b810a447 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1090,7 +1090,8 @@ alloc_new_skb:
1090 length -= copy; 1090 length -= copy;
1091 } 1091 }
1092 1092
1093 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc); 1093 if (wmem_alloc_delta)
1094 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);
1094 return 0; 1095 return 0;
1095 1096
1096error_efault: 1097error_efault:
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 88bc2ef7c7a8..a02ad100f0d7 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -106,14 +106,7 @@ int ip6_datagram_dst_update(struct sock *sk, bool fix_sk_saddr)
106 } 106 }
107 } 107 }
108 108
109 ip6_dst_store(sk, dst, 109 ip6_sk_dst_store_flow(sk, dst, &fl6);
110 ipv6_addr_equal(&fl6.daddr, &sk->sk_v6_daddr) ?
111 &sk->sk_v6_daddr : NULL,
112#ifdef CONFIG_IPV6_SUBTREES
113 ipv6_addr_equal(&fl6.saddr, &np->saddr) ?
114 &np->saddr :
115#endif
116 NULL);
117 110
118out: 111out:
119 fl6_sock_release(flowlabel); 112 fl6_sock_release(flowlabel);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index e6eaa4dd9f60..b8ee50e94af3 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1105,23 +1105,32 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup_flow);
1105 * @sk: socket which provides the dst cache and route info 1105 * @sk: socket which provides the dst cache and route info
1106 * @fl6: flow to lookup 1106 * @fl6: flow to lookup
1107 * @final_dst: final destination address for ipsec lookup 1107 * @final_dst: final destination address for ipsec lookup
1108 * @connected: whether @sk is connected or not
1108 * 1109 *
1109 * This function performs a route lookup on the given flow with the 1110 * This function performs a route lookup on the given flow with the
1110 * possibility of using the cached route in the socket if it is valid. 1111 * possibility of using the cached route in the socket if it is valid.
1111 * It will take the socket dst lock when operating on the dst cache. 1112 * It will take the socket dst lock when operating on the dst cache.
1112 * As a result, this function can only be used in process context. 1113 * As a result, this function can only be used in process context.
1113 * 1114 *
1115 * In addition, for a connected socket, cache the dst in the socket
1116 * if the current cache is not valid.
1117 *
1114 * It returns a valid dst pointer on success, or a pointer encoded 1118 * It returns a valid dst pointer on success, or a pointer encoded
1115 * error code. 1119 * error code.
1116 */ 1120 */
1117struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, 1121struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
1118 const struct in6_addr *final_dst) 1122 const struct in6_addr *final_dst,
1123 bool connected)
1119{ 1124{
1120 struct dst_entry *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie); 1125 struct dst_entry *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie);
1121 1126
1122 dst = ip6_sk_dst_check(sk, dst, fl6); 1127 dst = ip6_sk_dst_check(sk, dst, fl6);
1123 if (!dst) 1128 if (dst)
1124 dst = ip6_dst_lookup_flow(sk, fl6, final_dst); 1129 return dst;
1130
1131 dst = ip6_dst_lookup_flow(sk, fl6, final_dst);
1132 if (connected && !IS_ERR(dst))
1133 ip6_sk_dst_store_flow(sk, dst_clone(dst), fl6);
1125 1134
1126 return dst; 1135 return dst;
1127} 1136}
@@ -1536,7 +1545,8 @@ alloc_new_skb:
1536 length -= copy; 1545 length -= copy;
1537 } 1546 }
1538 1547
1539 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc); 1548 if (wmem_alloc_delta)
1549 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);
1540 return 0; 1550 return 0;
1541 1551
1542error_efault: 1552error_efault:
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 3622aac343ae..5e0332014c17 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -55,7 +55,6 @@ static const char nf_frags_cache_name[] = "nf-frags";
55static struct inet_frags nf_frags; 55static struct inet_frags nf_frags;
56 56
57#ifdef CONFIG_SYSCTL 57#ifdef CONFIG_SYSCTL
58static long zero;
59 58
60static struct ctl_table nf_ct_frag6_sysctl_table[] = { 59static struct ctl_table nf_ct_frag6_sysctl_table[] = {
61 { 60 {
@@ -71,7 +70,6 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
71 .maxlen = sizeof(unsigned long), 70 .maxlen = sizeof(unsigned long),
72 .mode = 0644, 71 .mode = 0644,
73 .proc_handler = proc_doulongvec_minmax, 72 .proc_handler = proc_doulongvec_minmax,
74 .extra1 = &zero,
75 .extra2 = &init_net.nf_frag.frags.high_thresh 73 .extra2 = &init_net.nf_frag.frags.high_thresh
76 }, 74 },
77 { 75 {
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index d12c55dad7d1..746eeae7f581 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -121,7 +121,7 @@ static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
121 ipc6.tclass = np->tclass; 121 ipc6.tclass = np->tclass;
122 fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel); 122 fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
123 123
124 dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr); 124 dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr, false);
125 if (IS_ERR(dst)) 125 if (IS_ERR(dst))
126 return PTR_ERR(dst); 126 return PTR_ERR(dst);
127 rt = (struct rt6_info *) dst; 127 rt = (struct rt6_info *) dst;
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 70e4a578b2fb..4979610287e2 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -548,7 +548,6 @@ static const struct inet6_protocol frag_protocol = {
548}; 548};
549 549
550#ifdef CONFIG_SYSCTL 550#ifdef CONFIG_SYSCTL
551static int zero;
552 551
553static struct ctl_table ip6_frags_ns_ctl_table[] = { 552static struct ctl_table ip6_frags_ns_ctl_table[] = {
554 { 553 {
@@ -565,7 +564,6 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = {
565 .maxlen = sizeof(unsigned long), 564 .maxlen = sizeof(unsigned long),
566 .mode = 0644, 565 .mode = 0644,
567 .proc_handler = proc_doulongvec_minmax, 566 .proc_handler = proc_doulongvec_minmax,
568 .extra1 = &zero,
569 .extra2 = &init_net.ipv6.frags.high_thresh 567 .extra2 = &init_net.ipv6.frags.high_thresh
570 }, 568 },
571 { 569 {
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f239f91d2efb..49b954d6d0fa 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2229,6 +2229,23 @@ void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
2229} 2229}
2230EXPORT_SYMBOL_GPL(ip6_sk_update_pmtu); 2230EXPORT_SYMBOL_GPL(ip6_sk_update_pmtu);
2231 2231
2232void ip6_sk_dst_store_flow(struct sock *sk, struct dst_entry *dst,
2233 const struct flowi6 *fl6)
2234{
2235#ifdef CONFIG_IPV6_SUBTREES
2236 struct ipv6_pinfo *np = inet6_sk(sk);
2237#endif
2238
2239 ip6_dst_store(sk, dst,
2240 ipv6_addr_equal(&fl6->daddr, &sk->sk_v6_daddr) ?
2241 &sk->sk_v6_daddr : NULL,
2242#ifdef CONFIG_IPV6_SUBTREES
2243 ipv6_addr_equal(&fl6->saddr, &np->saddr) ?
2244 &np->saddr :
2245#endif
2246 NULL);
2247}
2248
2232/* Handle redirects */ 2249/* Handle redirects */
2233struct ip6rd_flowi { 2250struct ip6rd_flowi {
2234 struct flowi6 fl6; 2251 struct flowi6 fl6;
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 6861ed479469..4ec76a87aeb8 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1116,10 +1116,10 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
1116 struct dst_entry *dst; 1116 struct dst_entry *dst;
1117 struct ipcm6_cookie ipc6; 1117 struct ipcm6_cookie ipc6;
1118 int addr_len = msg->msg_namelen; 1118 int addr_len = msg->msg_namelen;
1119 bool connected = false;
1119 int ulen = len; 1120 int ulen = len;
1120 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; 1121 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE;
1121 int err; 1122 int err;
1122 int connected = 0;
1123 int is_udplite = IS_UDPLITE(sk); 1123 int is_udplite = IS_UDPLITE(sk);
1124 int (*getfrag)(void *, char *, int, int, int, struct sk_buff *); 1124 int (*getfrag)(void *, char *, int, int, int, struct sk_buff *);
1125 struct sockcm_cookie sockc; 1125 struct sockcm_cookie sockc;
@@ -1241,7 +1241,7 @@ do_udp_sendmsg:
1241 fl6.fl6_dport = inet->inet_dport; 1241 fl6.fl6_dport = inet->inet_dport;
1242 daddr = &sk->sk_v6_daddr; 1242 daddr = &sk->sk_v6_daddr;
1243 fl6.flowlabel = np->flow_label; 1243 fl6.flowlabel = np->flow_label;
1244 connected = 1; 1244 connected = true;
1245 } 1245 }
1246 1246
1247 if (!fl6.flowi6_oif) 1247 if (!fl6.flowi6_oif)
@@ -1271,7 +1271,7 @@ do_udp_sendmsg:
1271 } 1271 }
1272 if (!(opt->opt_nflen|opt->opt_flen)) 1272 if (!(opt->opt_nflen|opt->opt_flen))
1273 opt = NULL; 1273 opt = NULL;
1274 connected = 0; 1274 connected = false;
1275 } 1275 }
1276 if (!opt) { 1276 if (!opt) {
1277 opt = txopt_get(np); 1277 opt = txopt_get(np);
@@ -1293,11 +1293,11 @@ do_udp_sendmsg:
1293 1293
1294 final_p = fl6_update_dst(&fl6, opt, &final); 1294 final_p = fl6_update_dst(&fl6, opt, &final);
1295 if (final_p) 1295 if (final_p)
1296 connected = 0; 1296 connected = false;
1297 1297
1298 if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) { 1298 if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) {
1299 fl6.flowi6_oif = np->mcast_oif; 1299 fl6.flowi6_oif = np->mcast_oif;
1300 connected = 0; 1300 connected = false;
1301 } else if (!fl6.flowi6_oif) 1301 } else if (!fl6.flowi6_oif)
1302 fl6.flowi6_oif = np->ucast_oif; 1302 fl6.flowi6_oif = np->ucast_oif;
1303 1303
@@ -1308,7 +1308,7 @@ do_udp_sendmsg:
1308 1308
1309 fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel); 1309 fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
1310 1310
1311 dst = ip6_sk_dst_lookup_flow(sk, &fl6, final_p); 1311 dst = ip6_sk_dst_lookup_flow(sk, &fl6, final_p, connected);
1312 if (IS_ERR(dst)) { 1312 if (IS_ERR(dst)) {
1313 err = PTR_ERR(dst); 1313 err = PTR_ERR(dst);
1314 dst = NULL; 1314 dst = NULL;
@@ -1333,7 +1333,7 @@ back_from_confirm:
1333 err = PTR_ERR(skb); 1333 err = PTR_ERR(skb);
1334 if (!IS_ERR_OR_NULL(skb)) 1334 if (!IS_ERR_OR_NULL(skb))
1335 err = udp_v6_send_skb(skb, &fl6); 1335 err = udp_v6_send_skb(skb, &fl6);
1336 goto release_dst; 1336 goto out;
1337 } 1337 }
1338 1338
1339 lock_sock(sk); 1339 lock_sock(sk);
@@ -1367,23 +1367,6 @@ do_append_data:
1367 err = np->recverr ? net_xmit_errno(err) : 0; 1367 err = np->recverr ? net_xmit_errno(err) : 0;
1368 release_sock(sk); 1368 release_sock(sk);
1369 1369
1370release_dst:
1371 if (dst) {
1372 if (connected) {
1373 ip6_dst_store(sk, dst,
1374 ipv6_addr_equal(&fl6.daddr, &sk->sk_v6_daddr) ?
1375 &sk->sk_v6_daddr : NULL,
1376#ifdef CONFIG_IPV6_SUBTREES
1377 ipv6_addr_equal(&fl6.saddr, &np->saddr) ?
1378 &np->saddr :
1379#endif
1380 NULL);
1381 } else {
1382 dst_release(dst);
1383 }
1384 dst = NULL;
1385 }
1386
1387out: 1370out:
1388 dst_release(dst); 1371 dst_release(dst);
1389 fl6_sock_release(flowlabel); 1372 fl6_sock_release(flowlabel);
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 21800e6f5019..0410d2277ca2 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -1200,6 +1200,12 @@ void rxrpc_data_ready(struct sock *udp_sk)
1200 !rxrpc_validate_jumbo(skb)) 1200 !rxrpc_validate_jumbo(skb))
1201 goto bad_message; 1201 goto bad_message;
1202 break; 1202 break;
1203
1204 /* Packet types 9-11 should just be ignored. */
1205 case RXRPC_PACKET_TYPE_PARAMS:
1206 case RXRPC_PACKET_TYPE_10:
1207 case RXRPC_PACKET_TYPE_11:
1208 goto discard;
1203 } 1209 }
1204 1210
1205 rcu_read_lock(); 1211 rcu_read_lock();
diff --git a/net/rxrpc/protocol.h b/net/rxrpc/protocol.h
index 4bddcf3face3..93da73bf7098 100644
--- a/net/rxrpc/protocol.h
+++ b/net/rxrpc/protocol.h
@@ -46,6 +46,9 @@ struct rxrpc_wire_header {
46#define RXRPC_PACKET_TYPE_CHALLENGE 6 /* connection security challenge (SRVR->CLNT) */ 46#define RXRPC_PACKET_TYPE_CHALLENGE 6 /* connection security challenge (SRVR->CLNT) */
47#define RXRPC_PACKET_TYPE_RESPONSE 7 /* connection secutity response (CLNT->SRVR) */ 47#define RXRPC_PACKET_TYPE_RESPONSE 7 /* connection secutity response (CLNT->SRVR) */
48#define RXRPC_PACKET_TYPE_DEBUG 8 /* debug info request */ 48#define RXRPC_PACKET_TYPE_DEBUG 8 /* debug info request */
49#define RXRPC_PACKET_TYPE_PARAMS 9 /* Parameter negotiation (unspec'd, ignore) */
50#define RXRPC_PACKET_TYPE_10 10 /* Ignored */
51#define RXRPC_PACKET_TYPE_11 11 /* Ignored */
49#define RXRPC_PACKET_TYPE_VERSION 13 /* version string request */ 52#define RXRPC_PACKET_TYPE_VERSION 13 /* version string request */
50#define RXRPC_N_PACKET_TYPES 14 /* number of packet types (incl type 0) */ 53#define RXRPC_N_PACKET_TYPES 14 /* number of packet types (incl type 0) */
51 54
@@ -78,6 +81,9 @@ struct rxrpc_wire_header {
78 (1 << RXRPC_PACKET_TYPE_CHALLENGE) | \ 81 (1 << RXRPC_PACKET_TYPE_CHALLENGE) | \
79 (1 << RXRPC_PACKET_TYPE_RESPONSE) | \ 82 (1 << RXRPC_PACKET_TYPE_RESPONSE) | \
80 /*(1 << RXRPC_PACKET_TYPE_DEBUG) | */ \ 83 /*(1 << RXRPC_PACKET_TYPE_DEBUG) | */ \
84 (1 << RXRPC_PACKET_TYPE_PARAMS) | \
85 (1 << RXRPC_PACKET_TYPE_10) | \
86 (1 << RXRPC_PACKET_TYPE_11) | \
81 (1 << RXRPC_PACKET_TYPE_VERSION)) 87 (1 << RXRPC_PACKET_TYPE_VERSION))
82 88
83/*****************************************************************************/ 89/*****************************************************************************/
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 3e5eba30865e..cee6674a3bf4 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -3280,7 +3280,8 @@ int tipc_sk_fill_sock_diag(struct sk_buff *skb, struct tipc_sock *tsk,
3280 nla_put_u32(skb, TIPC_NLA_SOCK_TIPC_STATE, (u32)sk->sk_state) || 3280 nla_put_u32(skb, TIPC_NLA_SOCK_TIPC_STATE, (u32)sk->sk_state) ||
3281 nla_put_u32(skb, TIPC_NLA_SOCK_INO, sock_i_ino(sk)) || 3281 nla_put_u32(skb, TIPC_NLA_SOCK_INO, sock_i_ino(sk)) ||
3282 nla_put_u32(skb, TIPC_NLA_SOCK_UID, 3282 nla_put_u32(skb, TIPC_NLA_SOCK_UID,
3283 from_kuid_munged(sk_user_ns(sk), sock_i_uid(sk))) || 3283 from_kuid_munged(sk_user_ns(NETLINK_CB(skb).sk),
3284 sock_i_uid(sk))) ||
3284 nla_put_u64_64bit(skb, TIPC_NLA_SOCK_COOKIE, 3285 nla_put_u64_64bit(skb, TIPC_NLA_SOCK_COOKIE,
3285 tipc_diag_gen_cookie(sk), 3286 tipc_diag_gen_cookie(sk),
3286 TIPC_NLA_SOCK_PAD)) 3287 TIPC_NLA_SOCK_PAD))
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 6925a989569b..b7d80bc5f4ab 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -145,6 +145,8 @@ struct tipc_subscription *tipc_sub_subscribe(struct net *net,
145 pr_warn("Subscription rejected, no memory\n"); 145 pr_warn("Subscription rejected, no memory\n");
146 return NULL; 146 return NULL;
147 } 147 }
148 INIT_LIST_HEAD(&sub->service_list);
149 INIT_LIST_HEAD(&sub->sub_list);
148 sub->net = net; 150 sub->net = net;
149 sub->conid = conid; 151 sub->conid = conid;
150 sub->inactive = false; 152 sub->inactive = false;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index aded82da1aea..68bb70a62afe 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -745,14 +745,6 @@ static struct proto unix_proto = {
745 .obj_size = sizeof(struct unix_sock), 745 .obj_size = sizeof(struct unix_sock),
746}; 746};
747 747
748/*
749 * AF_UNIX sockets do not interact with hardware, hence they
750 * dont trigger interrupts - so it's safe for them to have
751 * bh-unsafe locking for their sk_receive_queue.lock. Split off
752 * this special lock-class by reinitializing the spinlock key:
753 */
754static struct lock_class_key af_unix_sk_receive_queue_lock_key;
755
756static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) 748static struct sock *unix_create1(struct net *net, struct socket *sock, int kern)
757{ 749{
758 struct sock *sk = NULL; 750 struct sock *sk = NULL;
@@ -767,8 +759,6 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern)
767 goto out; 759 goto out;
768 760
769 sock_init_data(sock, sk); 761 sock_init_data(sock, sk);
770 lockdep_set_class(&sk->sk_receive_queue.lock,
771 &af_unix_sk_receive_queue_lock_key);
772 762
773 sk->sk_allocation = GFP_KERNEL_ACCOUNT; 763 sk->sk_allocation = GFP_KERNEL_ACCOUNT;
774 sk->sk_write_space = unix_write_space; 764 sk->sk_write_space = unix_write_space;