svn commit: r213821 - projects/ofed/head/sys/ofed/include/linux

Jeff Roberson jeff at FreeBSD.org
Thu Oct 14 01:47:47 UTC 2010


Author: jeff
Date: Thu Oct 14 01:47:47 2010
New Revision: 213821
URL: http://svn.freebsd.org/changeset/base/213821

Log:
   - Don't hold giant when calling wrapped callouts.
   - Do hold giant when calling devclass_add_child.
  
  Sponsored by:	Isilon Systems, iX Systems, and Panasas.

Modified:
  projects/ofed/head/sys/ofed/include/linux/module.h
  projects/ofed/head/sys/ofed/include/linux/pci.h

Modified: projects/ofed/head/sys/ofed/include/linux/module.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/module.h	Thu Oct 14 01:47:07 2010	(r213820)
+++ projects/ofed/head/sys/ofed/include/linux/module.h	Thu Oct 14 01:47:47 2010	(r213821)
@@ -61,7 +61,9 @@ _module_run(void *arg)
 		printf("Running %s (%p)\n", name, pc);
 
 	fn = arg;
+	DROP_GIANT();
 	fn();
+	PICKUP_GIANT();
 }
 
 #define	module_init(fn)							\

Modified: projects/ofed/head/sys/ofed/include/linux/pci.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/pci.h	Thu Oct 14 01:47:07 2010	(r213820)
+++ projects/ofed/head/sys/ofed/include/linux/pci.h	Thu Oct 14 01:47:47 2010	(r213821)
@@ -425,8 +425,10 @@ pci_register_driver(struct pci_driver *p
 	pdrv->driver.name = pdrv->name;
 	pdrv->driver.methods = pci_methods;
 	pdrv->driver.size = sizeof(struct pci_dev);
+	mtx_lock(&Giant);
 	error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT,
 	    &pdrv->bsdclass);
+	mtx_unlock(&Giant);
 	if (error)
 		return (-error);
 	return (0);


More information about the svn-src-projects mailing list