[Intel-wired-lan] [PATCH v1 02/18] fm10k: avoid possible null pointer dereference in fm10k_update_stats

Singh, Krishneil K krishneil.k.singh at intel.com
Mon Jul 11 19:24:07 UTC 2016



-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, June 3, 2016 3:42 PM
To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
Subject: [Intel-wired-lan] [PATCH v1 02/18] fm10k: avoid possible null pointer dereference in fm10k_update_stats

It's currently possible for fm10k_update_stats to be called during the window when we go down and the rings are removed. This can result in a null pointer dereference. In fm10k_get_stats64 we work around this by using ACCESS_ONCE and a null pointer check inside the loop. Use this same flow in the fm10k_update_stats to avoid the potential null pointer.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---


Tested-by: Krishneil Singh <Krishneil.k.singh at intel.com>



More information about the Intel-wired-lan mailing list