[Intel-wired-lan] [PATCH 1/6] fm10k: prevent null pointer dereference of msix_entries table

Singh, Krishneil K krishneil.k.singh at intel.com
Thu Feb 25 20:20:05 UTC 2016


-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Thursday, February 4, 2016 10:48 AM
To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
Subject: [Intel-wired-lan] [PATCH 1/6] fm10k: prevent null pointer dereference of msix_entries table

According to the C standard dereferencing a variable before it is checked invokes undefined behavior, and thus compilers are free to assume the check for NULL isn't necessary. Prevent this by re-ordering the NULL check of msix_entries in fm10k_free_mbx_irq.

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