OpenCloudOS-Kernel/drivers/net/ethernet/intel/e1000
Colin Ian King 5983587c8c e1000: avoid null pointer dereference on invalid stat type
Currently if the stat type is invalid then data[i] is being set
either by dereferencing a null pointer p, or it is reading from
an incorrect previous location if we had a valid stat type
previously.  Fix this by skipping over the read of p on an invalid
stat type.

Detected by CoverityScan, CID#113385 ("Explicit null dereferenced")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-10-26 07:42:57 -07:00
..
Makefile
e1000.h e1000: call ndo_stop() instead of dev_close() when running offline selftest 2016-04-06 14:47:55 -07:00
e1000_ethtool.c e1000: avoid null pointer dereference on invalid stat type 2017-10-26 07:42:57 -07:00
e1000_hw.c e1000: Elementary checkpatch warnings and checks removed 2015-12-12 23:13:52 -08:00
e1000_hw.h e1000: move e1000_tbi_adjust_stats to where its used 2014-09-12 00:51:10 -07:00
e1000_main.c e1000: fix race condition between e1000_down() and e1000_watchdog 2017-10-26 07:42:57 -07:00
e1000_osdep.h
e1000_param.c e1000: fix whitespace issues and multi-line comments 2013-02-15 21:46:37 -08:00