socsvn commit: r305048 - soc2016/vincenzo/head/sys/dev/netmap
vincenzo at FreeBSD.org
vincenzo at FreeBSD.org
Fri Jun 10 13:15:51 UTC 2016
Author: vincenzo
Date: Fri Jun 10 13:15:50 2016
New Revision: 305048
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305048
Log:
freebsd: ptnet: fix kernel crash due to uninitialized data structure
Modified:
soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Fri Jun 10 13:15:36 2016 (r305047)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Fri Jun 10 13:15:50 2016 (r305048)
@@ -344,6 +344,7 @@
/* Prepare a netmap_adapter struct instance to do netmap_attach(). */
nifp_offset = bus_read_4(sc->iomem, PTNET_IO_NIFP_OFS);
+ memset(&na_arg, 0, sizeof(na_arg));
na_arg.ifp = ifp;
na_arg.num_tx_desc = bus_read_4(sc->iomem, PTNET_IO_NUM_TX_SLOTS);
na_arg.num_rx_desc = bus_read_4(sc->iomem, PTNET_IO_NUM_RX_SLOTS);
More information about the svn-soc-all
mailing list