NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/58024: wg-userspace N destroy fails to destroy tun interface created by wg-userspace N create
The EEXIST happens because of all this crud in the opencrypto rump
component, used to create the /dev/crypto node in the rump system's
namespace:
https://nxr.netbsd.org/xref/src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c?r=1.6#54
54 if ((error = devsw_attach("crypto", NULL, &bmaj,
55 &crypto_cdevsw, &cmaj)) != 0)
56 panic("cannot attach crypto: %d", error);
57
58 if ((error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/crypto",
59 cmaj, 0)) != 0)
60 panic("cannot create /dev/crypto: %d", error);
61
62 /*
63 * Initialize OpenCrypto and its pseudo-devices here
64 */
65 crypto_init();
66 rump_pdev_add(cryptoattach, 1);
67 #if 0
68 /*
69 * rump defines "_MODULE" in spite of using built-in module
70 * initialization(module_init_class()). So, swcryptoattach_internal()
71 * is called by two functions, one is swcryptoattach() and the other is
72 * swcrypto_modcmd().
73 * That causes "builtin module `swcrypto' failed to init" WARNING message.
74 * To suppress this warning, we let rump use swcrypto_modcmd() call-path
75 * only.
76 *
77 * TODO:
78 * There is still "crypto: unable to register devsw, error 17" message.
79 * it should be suppressed.
80 */
81 rump_pdev_add(swcryptoattach, 0);
82 #endif
This is all very grody and should be done differently, and it's not
clear that just suppressing the warning here is right.
Home |
Main Index |
Thread Index |
Old Index