Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ieee1394 ieee1394: Need kernel lock around config_fo...



details:   https://anonhg.NetBSD.org/src/rev/7d9ea3b3ef4b
branches:  trunk
changeset: 1029070:7d9ea3b3ef4b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Dec 20 19:56:42 2021 +0000

description:
ieee1394: Need kernel lock around config_found.

diffstat:

 sys/dev/ieee1394/firewire.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r aaddf757236d -r 7d9ea3b3ef4b sys/dev/ieee1394/firewire.c
--- a/sys/dev/ieee1394/firewire.c       Mon Dec 20 19:54:07 2021 +0000
+++ b/sys/dev/ieee1394/firewire.c       Mon Dec 20 19:56:42 2021 +0000
@@ -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 @@
 
                        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;



Home | Main Index | Thread Index | Old Index