svn commit: r351603 - head/sys/dev/vnic
Ed Maste
emaste at FreeBSD.org
Thu Aug 29 12:05:07 UTC 2019
Author: emaste
Date: Thu Aug 29 12:05:06 2019
New Revision: 351603
URL: https://svnweb.freebsd.org/changeset/base/351603
Log:
vnic: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/dev/vnic/thunder_bgx.c
Modified: head/sys/dev/vnic/thunder_bgx.c
==============================================================================
--- head/sys/dev/vnic/thunder_bgx.c Thu Aug 29 09:29:39 2019 (r351602)
+++ head/sys/dev/vnic/thunder_bgx.c Thu Aug 29 12:05:06 2019 (r351603)
@@ -502,9 +502,8 @@ bgx_add_dmac_addr(uint64_t dmac, int node, int bgx_idx
bgx_idx += node * MAX_BGX_PER_CN88XX;
bgx = bgx_vnic[bgx_idx];
- if (!bgx) {
- device_printf(bgx->dev,
- "BGX%d not yet initialized, ignoring DMAC addition\n",
+ if (bgx == NULL) {
+ printf("BGX%d not yet initialized, ignoring DMAC addition\n",
bgx_idx);
return;
}
More information about the svn-src-head
mailing list