• Uncategorized

About linux : Error-when-inserting-kernel-module-module-uses-symbol-from-namespace-but-does-not-import-it

Question Detail

When compiling driver for rtl8189fs, a warning was generated without terminating the compilation:

WARNING: module 8189fs uses symbol kernel_read from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

When inserting this module, this warning is printed to the kernel buffer and the insertion failed.

Driver source: rtl8189ES_linux

Kernel version: 5.4.61

Question Answer

It turned out that the source uses kernel_read() function, which requires importing the VFS namespace outside a file system module. This can be done with adding this declaration before the statement calling to kernel_read():

MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);

This fix should be applied to each file which called to kernel_read() in the source tree.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.