Author: vmaffione Date: Thu Jan 24 22:09:26 2019 New Revision: 343413 URL: https://svnweb.freebsd.org/changeset/base/343413
Log: netmap: fix crash with monitors and VALE ports Crash report described here: https://github.com/luigirizzo/netmap/issues/583 Fixed by providing dummy sync callback in case it is missing. Modified: head/sys/dev/netmap/netmap_monitor.c Modified: head/sys/dev/netmap/netmap_monitor.c ============================================================================== --- head/sys/dev/netmap/netmap_monitor.c Thu Jan 24 20:35:58 2019 (r343412) +++ head/sys/dev/netmap/netmap_monitor.c Thu Jan 24 22:09:26 2019 (r343413) @@ -259,11 +259,20 @@ static int netmap_monitor_parent_txsync(struct netmap_ static int netmap_monitor_parent_rxsync(struct netmap_kring *, int); static int netmap_monitor_parent_notify(struct netmap_kring *, int); +static int +nm_monitor_dummycb(struct netmap_kring *kring, int flags) +{ + (void)kring; + (void)flags; + return 0; +} + static void nm_monitor_intercept_callbacks(struct netmap_kring *kring) { ND("intercept callbacks on %s", kring->name); - kring->mon_sync = kring->nm_sync; + kring->mon_sync = kring->nm_sync != NULL ? + kring->nm_sync : nm_monitor_dummycb; kring->mon_notify = kring->nm_notify; if (kring->tx == NR_TX) { kring->nm_sync = netmap_monitor_parent_txsync; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"