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

!6620 packet: annotate data-races around ignore_outgoing

parents 9c7763ce feebcec9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2325,7 +2325,7 @@ void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
	rcu_read_lock();
again:
	list_for_each_entry_rcu(ptype, ptype_list, list) {
		if (ptype->ignore_outgoing)
		if (READ_ONCE(ptype->ignore_outgoing))
			continue;

		/* Never send packets back to the socket
+2 −2
Original line number Diff line number Diff line
@@ -3951,7 +3951,7 @@ packet_setsockopt(struct socket *sock, int level, int optname, sockptr_t optval,
		if (val < 0 || val > 1)
			return -EINVAL;

		po->prot_hook.ignore_outgoing = !!val;
		WRITE_ONCE(po->prot_hook.ignore_outgoing, !!val);
		return 0;
	}
	case PACKET_TX_HAS_OFF:
@@ -4083,7 +4083,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
		       0);
		break;
	case PACKET_IGNORE_OUTGOING:
		val = po->prot_hook.ignore_outgoing;
		val = READ_ONCE(po->prot_hook.ignore_outgoing);
		break;
	case PACKET_ROLLOVER_STATS:
		if (!po->rollover)