Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ieee1394 ...and be sure to config_pending_decr if kt...



details:   https://anonhg.NetBSD.org/src/rev/9df9002f8699
branches:  trunk
changeset: 780735:9df9002f8699
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 05 02:47:52 2012 +0000

description:
...and be sure to config_pending_decr if kthread_create fails.

This error branch looks suspect, though.  Shouldn't we bail at this
point rather than blithely try to proceed?

diffstat:

 sys/dev/ieee1394/firewire.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r b8674811d3c8 -r 9df9002f8699 sys/dev/ieee1394/firewire.c
--- a/sys/dev/ieee1394/firewire.c       Sun Aug 05 02:36:16 2012 +0000
+++ b/sys/dev/ieee1394/firewire.c       Sun Aug 05 02:47:52 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: firewire.c,v 1.41 2012/08/05 02:36:16 riastradh Exp $  */
+/*     $NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 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.41 2012/08/05 02:36:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -260,8 +260,10 @@
 
        /* create thread */
        if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, fw_bus_probe_thread,
-           fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev)))
+           fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev))) {
                aprint_error_dev(self, "kthread_create failed\n");
+               config_pending_decr();
+       }
 
        devlist = malloc(sizeof(struct firewire_dev_list), M_DEVBUF, M_NOWAIT);
        if (devlist == NULL) {



Home | Main Index | Thread Index | Old Index