Module Name: src Committed By: msaitoh Date: Mon May 14 09:21:36 UTC 2018
Modified Files: src/sys/dev/pci/ixgbe: ixv.c Log Message: Fix panic or hangup when "sysctl -w hw.ixgN.debug=1". XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.96 src/sys/dev/pci/ixgbe/ixv.c:1.97 --- src/sys/dev/pci/ixgbe/ixv.c:1.96 Tue May 8 09:45:54 2018 +++ src/sys/dev/pci/ixgbe/ixv.c Mon May 14 09:21:36 2018 @@ -1,4 +1,4 @@ -/*$NetBSD: ixv.c,v 1.96 2018/05/08 09:45:54 msaitoh Exp $*/ +/*$NetBSD: ixv.c,v 1.97 2018/05/14 09:21:36 msaitoh Exp $*/ /****************************************************************************** @@ -2639,21 +2639,18 @@ ixv_print_debug_info(struct adapter *ada static int ixv_sysctl_debug(SYSCTLFN_ARGS) { - struct sysctlnode node; - struct adapter *adapter; + struct sysctlnode node = *rnode; + struct adapter *adapter = (struct adapter *)node.sysctl_data; int error, result; - node = *rnode; node.sysctl_data = &result; error = sysctl_lookup(SYSCTLFN_CALL(&node)); if (error || newp == NULL) return error; - if (result == 1) { - adapter = (struct adapter *)node.sysctl_data; + if (result == 1) ixv_print_debug_info(adapter); - } return 0; } /* ixv_sysctl_debug */