diff options
Diffstat (limited to 'net/ethernet/eth.c')
| -rw-r--r-- | net/ethernet/eth.c | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 17374afee28f..9040fe55e0f5 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -244,7 +244,12 @@ int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16  	eth->h_proto = type;  	memcpy(eth->h_source, dev->dev_addr, ETH_ALEN);  	memcpy(eth->h_dest, neigh->ha, ETH_ALEN); -	hh->hh_len = ETH_HLEN; + +	/* Pairs with READ_ONCE() in neigh_resolve_output(), +	 * neigh_hh_output() and neigh_update_hhs(). +	 */ +	smp_store_release(&hh->hh_len, ETH_HLEN); +  	return 0;  }  EXPORT_SYMBOL(eth_header_cache);  |