speedtch Makefile,1.11,1.12 usbatm2.c,1.14,1.15

Duncan Sands duncan at infradead.org
Fri Jan 28 07:31:28 EST 2005


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv16992

Modified Files:
	Makefile usbatm2.c 
Log Message:
Fix the module unloading race by calling complete_and_exit: since the executing
code is not in the module (and no further code in the module is run) there is
no longer a problem.


Index: Makefile
===================================================================
RCS file: /home/cvs/speedtch/Makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Makefile	27 Jan 2005 10:00:13 -0000	1.11
+++ Makefile	28 Jan 2005 12:31:24 -0000	1.12
@@ -4,7 +4,8 @@
 
 FIRMWARE_EXTRACTOR := firmware
 
-obj-m := cxacru.o speedtch.o usb_atm.o usbatm2.o speedtch2.o cxacru2.o
+#obj-m := cxacru.o speedtch.o usb_atm.o usbatm2.o speedtch2.o cxacru2.o
+obj-m := cxacru.o usb_atm.o usbatm2.o cxacru2.o
 
 all help modules modules_install:
 	$(MAKE) -C $(KERNELDIR) M=$(PWD) $(filter-out all,$(MAKECMDGOALS)) EXTRA_CFLAGS=-DDEBUG

Index: usbatm2.c
===================================================================
RCS file: /home/cvs/speedtch/usbatm2.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- usbatm2.c	28 Jan 2005 12:11:04 -0000	1.14
+++ usbatm2.c	28 Jan 2005 12:31:24 -0000	1.15
@@ -1010,10 +1010,9 @@
 
 	down(&instance->serialize);
 	instance->thread_pid = -1;
-	complete(&instance->thread_exited);
 	up(&instance->serialize);
 
-	return ret;
+	complete_and_exit(&instance->thread_exited, ret);
 }
 
 static int usbatm_heavy_init(struct usbatm_data *instance)




More information about the Usbatm-commits mailing list