svn commit: r309559 - in stable: 10/sys/dev/cxgbe 11/sys/dev/cxgbe
John Baldwin
jhb at FreeBSD.org
Mon Dec 5 19:37:16 UTC 2016
Author: jhb
Date: Mon Dec 5 19:37:15 2016
New Revision: 309559
URL: https://svnweb.freebsd.org/changeset/base/309559
Log:
MFC 305667:
cxgbe(4): Avoid a NULL dereference in the clearstats ioctl handler.
Port softc's are not initialized when the adapter is in recovery mode.
Modified:
stable/11/sys/dev/cxgbe/t4_main.c
Directory Properties:
stable/11/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/sys/dev/cxgbe/t4_main.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/11/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_main.c Mon Dec 5 19:34:52 2016 (r309558)
+++ stable/11/sys/dev/cxgbe/t4_main.c Mon Dec 5 19:37:15 2016 (r309559)
@@ -8868,6 +8868,8 @@ t4_ioctl(struct cdev *dev, unsigned long
if (port_id >= sc->params.nports)
return (EINVAL);
pi = sc->port[port_id];
+ if (pi == NULL)
+ return (EIO);
/* MAC stats */
t4_clr_port_stats(sc, pi->tx_chan);
More information about the svn-src-stable
mailing list