diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-12 18:02:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-15 11:33:48 +0200 |
commit | 3fa29971c69519629370b119b0b618ee88ade6b9 (patch) | |
tree | 3008d12c2cb04af2d4e8038799d28dcfce797b7b /net/sctp | |
parent | ipv6: lockless IPV6_DONTFRAG implementation (diff) | |
download | linux-3fa29971c69519629370b119b0b618ee88ade6b9.tar.xz linux-3fa29971c69519629370b119b0b618ee88ade6b9.zip |
ipv6: lockless IPV6_RECVERR implemetation
np->recverr is moved to inet->inet_flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/ipv6.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 43f2731bf590..42b5b853ea01 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -128,7 +128,6 @@ static void sctp_v6_err_handle(struct sctp_transport *t, struct sk_buff *skb, { struct sctp_association *asoc = t->asoc; struct sock *sk = asoc->base.sk; - struct ipv6_pinfo *np; int err = 0; switch (type) { @@ -149,9 +148,8 @@ static void sctp_v6_err_handle(struct sctp_transport *t, struct sk_buff *skb, break; } - np = inet6_sk(sk); icmpv6_err_convert(type, code, &err); - if (!sock_owned_by_user(sk) && np->recverr) { + if (!sock_owned_by_user(sk) && inet6_test_bit(RECVERR6, sk)) { sk->sk_err = err; sk_error_report(sk); } else { |