Module Name: src Committed By: riastradh Date: Sun Aug 5 02:47:52 UTC 2012
Modified Files: src/sys/dev/ieee1394: firewire.c Log Message: ...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? To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 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.41 src/sys/dev/ieee1394/firewire.c:1.42 --- src/sys/dev/ieee1394/firewire.c:1.41 Sun Aug 5 02:36:16 2012 +++ src/sys/dev/ieee1394/firewire.c Sun Aug 5 02:47:52 2012 @@ -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 @@ firewireattach(device_t parent, device_t /* 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) {