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/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Mon Dec 5 19:34:52 2016 (r309558) +++ stable/10/sys/dev/cxgbe/t4_main.c Mon Dec 5 19:37:15 2016 (r309559) @@ -8726,6 +8726,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); _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"