kldload(2) smbfs failed in -CURRENT but kernel function returns 0

From: Tai-hwa Liang <avatar_at_mmlab.cse.yzu.edu.tw>
Date: Wed, 1 Sep 2004 18:35:32 +0800 (CST)
Greetings,

  Apparently the first time mount_smbfs was executed, smbfs related modules
will be loaded by kldload(2); however, the result of the first kldload(2)
was always ENOENT even if smbfs.ko was successfully loaded. Only the later
run of mount_smbfs works.

  It also interesting since manually "kldload smbfs" or even load smbfs
in /boot/loader.conf never run into ENOENT error. Furthermore, according
to various debugging printf() inserted in kldload() or linker_load_module(),
the return code is definitely zero. Any ideas about how this could happen?

f22 /root# mount_smbfs //user_at_smbshare/upload /mnt
mount_smbfs: kldload(smbfs): No such file or directory
f22 /root# mount_smbfs //user_at_smbshare/upload /mnt
Password:

relevant ktrace information:

   598 mount_smbfs CALL  kldload(0x80496a6)
   598 mount_smbfs NAMI  "/boot/kernel/linker.hints"
   598 mount_smbfs NAMI  "/boot/kernel/smbfs"
   598 mount_smbfs NAMI  "/boot/kernel/smbfs.ko"
   598 mount_smbfs NAMI  "/boot/kernel/smbfs.ko"
   598 mount_smbfs NAMI  "/boot/kernel/linker.hints"
   598 mount_smbfs NAMI  "/boot/kernel/libiconv.ko"
   598 mount_smbfs NAMI  "/boot/kernel/libiconv.ko"
   598 mount_smbfs NAMI  "/boot/kernel/linker.hints"
   598 mount_smbfs NAMI  "/boot/kernel/libmchain.ko"
   598 mount_smbfs NAMI  "/boot/kernel/libmchain.ko"
   598 mount_smbfs RET   kldload 18/0x12
   598 mount_smbfs CALL  fstat(0x1,0xbfbfd990)
   598 mount_smbfs RET   fstat 0
   598 mount_smbfs CALL  ioctl(0x1,TIOCGETA,0xbfbfd9d0)
   598 mount_smbfs RET   ioctl 0
   598 mount_smbfs CALL  write(0x1,0x804d000,0xa)
   598 mount_smbfs GIO   fd 1 wrote 10 bytes
       "error = 2
       "
   598 mount_smbfs RET   write 10/0xa
Received on Wed Sep 01 2004 - 08:35:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:09 UTC