Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sysmon If autoload of the subcomponent module fails, ...



details:   https://anonhg.NetBSD.org/src/rev/c3843307041b
branches:  trunk
changeset: 808107:c3843307041b
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon May 04 23:50:36 2015 +0000

description:
If autoload of the subcomponent module fails, don't try to call its
open routine.  Just return an error.

Hopefully this will fix the recently reported issues with atf tests
running on xen guest.

diffstat:

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

diffs (30 lines):

diff -r bcc14b300078 -r c3843307041b sys/dev/sysmon/sysmon.c
--- a/sys/dev/sysmon/sysmon.c   Mon May 04 22:59:36 2015 +0000
+++ b/sys/dev/sysmon/sysmon.c   Mon May 04 23:50:36 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon.c,v 1.25 2015/04/29 03:27:27 pgoyette Exp $     */
+/*     $NetBSD: sysmon.c,v 1.26 2015/05/04 23:50:36 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.25 2015/04/29 03:27:27 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.26 2015/05/04 23:50:36 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -153,8 +153,10 @@
                        error = module_autoload(sysmon_mod[minor(dev)],
                                                MODULE_CLASS_MISC);
                        mutex_enter(&sysmon_minor_mtx);
-                       if (sysmon_opvec_table[minor(dev)] == NULL)
+                       if (sysmon_opvec_table[minor(dev)] == NULL) {
                                error = ENODEV;
+                               break;
+                       }
                }
                error = (sysmon_opvec_table[minor(dev)]->so_open)(dev, flag,
                    mode, l);



Home | Main Index | Thread Index | Old Index