Re: [PATCH 4/4] net/core/dev.c : Race condition in net_tx_action.

From: David Miller
Date: Wed Feb 25 2015 - 13:48:02 EST


From: Ameen Ali <ameenali023@xxxxxxxxx>
Date: Wed, 25 Feb 2015 19:50:59 +0200

> @@ -3413,7 +3413,7 @@ EXPORT_SYMBOL(netif_rx_ni);
>
> static void net_tx_action(struct softirq_action *h)
> {
> - struct softnet_data *sd = this_cpu_ptr(&softnet_data);
> + volatile struct softnet_data *sd = &__get_cpu_var(softnet_data);

volatile is never an appropriate solution to a race condition
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/