diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-05 11:20:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-05 11:20:39 -0400 |
commit | 212dab0541eb916f29d55f914c8e84e13c6b214d (patch) | |
tree | 598087908a7f4c50bdb1987de8ac3f87cdec607e /net | |
parent | 60f5a21736322c25b297b022aa48aeb28fd56f9e (diff) | |
parent | 91874ecf32e41b5d86a4cb9d60e0bee50d828058 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Handle frames in error situations properly in AF_XDP, from Jakub
Kicinski.
2) tcp_mmap test case only tests ipv6 due to a thinko, fix from
Maninder Singh.
3) Session refcnt fix in l2tp_ppp, from Guillaume Nault.
4) Fix regression in netlink bind handling of multicast gruops, from
Dmitry Safonov.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
netlink: Don't shift on 64 for ngroups
net/smc: no cursor update send in state SMC_INIT
l2tp: fix missing refcount drop in pppol2tp_tunnel_ioctl()
mlxsw: core_acl_flex_actions: Remove redundant mirror resource destruction
mlxsw: core_acl_flex_actions: Remove redundant counter destruction
mlxsw: core_acl_flex_actions: Remove redundant resource destruction
mlxsw: core_acl_flex_actions: Return error for conflicting actions
selftests/bpf: update test_lwt_seg6local.sh according to iproute2
drivers: net: lmc: fix case value for target abort error
selftest/net: fix protocol family to work for IPv4.
net: xsk: don't return frames via the allocator on error
tools/bpftool: fix a percpu_array map dump problem
Diffstat (limited to 'net')
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 13 | ||||
-rw-r--r-- | net/netlink/af_netlink.c | 4 | ||||
-rw-r--r-- | net/smc/smc_cdc.c | 3 | ||||
-rw-r--r-- | net/xdp/xsk.c | 4 |
4 files changed, 14 insertions, 10 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index e398797878a9..cf6cca260e7b 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c | |||
@@ -1201,13 +1201,18 @@ static int pppol2tp_tunnel_ioctl(struct l2tp_tunnel *tunnel, | |||
1201 | l2tp_session_get(sock_net(sk), tunnel, | 1201 | l2tp_session_get(sock_net(sk), tunnel, |
1202 | stats.session_id); | 1202 | stats.session_id); |
1203 | 1203 | ||
1204 | if (session && session->pwtype == L2TP_PWTYPE_PPP) { | 1204 | if (!session) { |
1205 | err = pppol2tp_session_ioctl(session, cmd, | 1205 | err = -EBADR; |
1206 | arg); | 1206 | break; |
1207 | } | ||
1208 | if (session->pwtype != L2TP_PWTYPE_PPP) { | ||
1207 | l2tp_session_dec_refcount(session); | 1209 | l2tp_session_dec_refcount(session); |
1208 | } else { | ||
1209 | err = -EBADR; | 1210 | err = -EBADR; |
1211 | break; | ||
1210 | } | 1212 | } |
1213 | |||
1214 | err = pppol2tp_session_ioctl(session, cmd, arg); | ||
1215 | l2tp_session_dec_refcount(session); | ||
1211 | break; | 1216 | break; |
1212 | } | 1217 | } |
1213 | #ifdef CONFIG_XFRM | 1218 | #ifdef CONFIG_XFRM |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index c09d16870f74..56704d95f82d 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1013,8 +1013,8 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr, | |||
1013 | 1013 | ||
1014 | if (nlk->ngroups == 0) | 1014 | if (nlk->ngroups == 0) |
1015 | groups = 0; | 1015 | groups = 0; |
1016 | else | 1016 | else if (nlk->ngroups < 8*sizeof(groups)) |
1017 | groups &= (1ULL << nlk->ngroups) - 1; | 1017 | groups &= (1UL << nlk->ngroups) - 1; |
1018 | 1018 | ||
1019 | bound = nlk->bound; | 1019 | bound = nlk->bound; |
1020 | if (bound) { | 1020 | if (bound) { |
diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c index a7e8d63fc8ae..9bde1e4ca288 100644 --- a/net/smc/smc_cdc.c +++ b/net/smc/smc_cdc.c | |||
@@ -233,7 +233,8 @@ static void smc_cdc_msg_recv_action(struct smc_sock *smc, | |||
233 | /* force immediate tx of current consumer cursor, but | 233 | /* force immediate tx of current consumer cursor, but |
234 | * under send_lock to guarantee arrival in seqno-order | 234 | * under send_lock to guarantee arrival in seqno-order |
235 | */ | 235 | */ |
236 | smc_tx_sndbuf_nonempty(conn); | 236 | if (smc->sk.sk_state != SMC_INIT) |
237 | smc_tx_sndbuf_nonempty(conn); | ||
237 | } | 238 | } |
238 | } | 239 | } |
239 | 240 | ||
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 72335c2e8108..4e937cd7c17d 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c | |||
@@ -84,10 +84,8 @@ static int __xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len) | |||
84 | { | 84 | { |
85 | int err = xskq_produce_batch_desc(xs->rx, (u64)xdp->handle, len); | 85 | int err = xskq_produce_batch_desc(xs->rx, (u64)xdp->handle, len); |
86 | 86 | ||
87 | if (err) { | 87 | if (err) |
88 | xdp_return_buff(xdp); | ||
89 | xs->rx_dropped++; | 88 | xs->rx_dropped++; |
90 | } | ||
91 | 89 | ||
92 | return err; | 90 | return err; |
93 | } | 91 | } |