Module Name:    src
Committed By:   riastradh
Date:           Mon Dec 20 19:56:42 UTC 2021

Modified Files:
        src/sys/dev/ieee1394: firewire.c

Log Message:
ieee1394: Need kernel lock around config_found.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ieee1394/firewire.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/ieee1394/firewire.c
diff -u src/sys/dev/ieee1394/firewire.c:1.53 src/sys/dev/ieee1394/firewire.c:1.54
--- src/sys/dev/ieee1394/firewire.c:1.53	Mon Oct  4 20:48:05 2021
+++ src/sys/dev/ieee1394/firewire.c	Mon Dec 20 19:56:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewire.c,v 1.53 2021/10/04 20:48:05 andvar Exp $	*/
+/*	$NetBSD: firewire.c,v 1.54 2021/12/20 19:56:42 riastradh Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.53 2021/10/04 20:48:05 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.54 2021/12/20 19:56:42 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -2041,9 +2041,11 @@ fw_attach_dev(struct firewire_comm *fc)
 
 			fwa.name = fw_get_devclass(fwdev);
 			fwa.fwdev = fwdev;
+			KERNEL_LOCK(1, NULL);
 			fwdev->dev = config_found(sc->dev, &fwa, firewire_print,
 			    CFARGS(.submatch = config_stdsubmatch,
 				   .locators = locs));
+			KERNEL_UNLOCK_ONE(NULL);
 			if (fwdev->dev == NULL) {
 				free(devlist, M_DEVBUF);
 				break;

Reply via email to