VirtualBox

Ticket #3284 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: jkeil Owned by:
Priority: minor 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

comment:1 Changed 5 years ago by ramshankar

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

comment:2 Changed 5 years ago by frank

  • Summary changed from _init() driver entry point in vboxdrv kernel module returns bogus error value to _init() driver entry point in vboxdrv kernel module returns bogus error value => Fixed in SVN

comment:3 Changed 5 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use