git: a75400c5addf - main - modules: felix: Remove etherswitch_if.c from Makefile

Wojciech Macek wma at FreeBSD.org
Fri Oct 1 09:26:20 UTC 2021


The branch main has been updated by wma:

URL: https://cgit.FreeBSD.org/src/commit/?id=a75400c5addf905edea7897c5071904556a691f2

commit a75400c5addf905edea7897c5071904556a691f2
Author:     Kornel Duleba <mindal at semihalf.com>
AuthorDate: 2021-09-30 11:06:34 +0000
Commit:     Wojciech Macek <wma at FreeBSD.org>
CommitDate: 2021-10-01 09:24:08 +0000

    modules: felix: Remove etherswitch_if.c from Makefile
    
    Having it included confuses KOBJOPLOOKUP resulting in kobj_error_method
    being called instead of a devmethod from the switch driver.
    That in turn returns ENXIO which was treated as a pointer and
    dereferenced by etherswitch ioctl logic causing the kernel to panic.
    
    Fixes: b542c9e42ba4 (modules: felix: Add needed dependencies)
---
 sys/modules/felix/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/modules/felix/Makefile b/sys/modules/felix/Makefile
index a9eac1080c91..8f30a0e72a45 100644
--- a/sys/modules/felix/Makefile
+++ b/sys/modules/felix/Makefile
@@ -29,7 +29,7 @@
 .PATH:	${SRCTOP}/sys/dev/etherswitch/felix
 
 KMOD	= felix
-SRCS	= felix.c etherswitch_if.c etherswitch_if.h
-SRCS	+= bus_if.h device_if.h miibus_if.h ofw_bus_if.h pci_if.h
+SRCS	= felix.c
+SRCS	+= bus_if.h device_if.h etherswitch_if.h miibus_if.h ofw_bus_if.h pci_if.h
 
 .include <bsd.kmod.mk>


More information about the dev-commits-src-all mailing list