Unverified Commit 078e0901 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13150 net: fix data-races around sk->sk_forward_alloc

parents bafa65a8 d6c99954
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
	   by tcp. Feel free to propose better solution.
					       --ANK (980728)
	 */
	if (np->rxopt.all)
	if (np->rxopt.all && sk->sk_state != DCCP_LISTEN)
		opt_skb = skb_clone_and_charge_r(skb, sk);

	if (sk->sk_state == DCCP_OPEN) { /* Fast path */
+1 −3
Original line number Diff line number Diff line
@@ -1330,7 +1330,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
	   by tcp. Feel free to propose better solution.
					       --ANK (980728)
	 */
	if (np->rxopt.all)
	if (np->rxopt.all && sk->sk_state != TCP_LISTEN)
		opt_skb = skb_clone_and_charge_r(skb, sk);

	if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */
@@ -1367,8 +1367,6 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
		if (nsk != sk) {
			if (tcp_child_process(sk, nsk, skb))
				goto reset;
			if (opt_skb)
				__kfree_skb(opt_skb);
			return 0;
		}
	} else