VirtualBox

Opened 16 years ago

Closed 16 years ago

#3284 closed defect (fixed)

_init() driver entry point in vboxdrv kernel module returns bogus error value => Fixed in SVN

Reported by: jkeil Owned by:
Component: host support Version: VirtualBox 2.1.2
Keywords: Cc:
Guest type: other Host type: Solaris

Description

In this forum thread http://forums.virtualbox.org/viewtopic.php?t=13950 we found out that failures during an attempt to load the Solaris vboxdrv kernel module result in bogus error messages, like this:

bash-3.2# modload -p drv/vboxdrv
can't load module: Unknown error 

I can reproduce this issue by deliberately messing with the /etc/name_to_major file, changing

vboxdrv 297
vboxflt 298

to

xvboxdrv 297
xvboxflt 298

(added 'x' in front of the module names), followed by a reboot. After that change, modload -p drv/vboxdrv returns an error with errno == -1 (an unknown error code).

The bug is in src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c in function _init(). An _init(9e) function is supposed to return a positive error code from <sys/errno.h>, not -1:

   192	/**
   193   * Kernel entry points
   194	 */
   195  int _init(void)
   196	{
   197      LogFlow((DEVICE_NAME ":_init\n"));
   198
...
   254	
   255	    return -1;    <<<<<<<
   256	}

In my test case, the mod_install() call inside vboxdrv's _init() function failed with errrno == ENXIO; in this case ENXIO is the expected return code for the _init() function - and not -1.

Change History (3)

comment:1 by Ramshankar Venkataraman, 16 years ago

Thanks for reporting this. This has been fixed in internal SVN.

comment:2 by Frank Mehnert, 16 years ago

Summary: _init() driver entry point in vboxdrv kernel module returns bogus error value_init() driver entry point in vboxdrv kernel module returns bogus error value => Fixed in SVN

comment:3 by Frank Mehnert, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette