From d6a07317b4c0b40eb67a148058a23c9fe1c38d0b Mon Sep 17 00:00:00 2001 From: Steve Jeong Date: Tue, 18 Jul 2023 16:19:45 +0900 Subject: [PATCH] fix: os_dep/osdep_service.c: add VFS namespace Error in Rockchip v20230524 kernel 5.10.y ERROR: modpost: module 8821cu uses symbol kernel_write from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it. ERROR: modpost: module 8821cu uses symbol kernel_read from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it. ERROR: modpost: module 8821cu uses symbol filp_open from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it. make[1]: *** [scripts/Makefile.modpost:168: modules-only.symvers] Error 1 make[1]: *** Deleting file 'modules-only.symvers' make: *** [Makefile:1524: modules] Error 2 make: *** Waiting for unfinished jobs.... Signed-off-by: Steve Jeong --- os_dep/osdep_service.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 31d8670..d772767 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2428,6 +2428,7 @@ static int readFile(struct file *fp, char *buf, int len) while (sum < len) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) + MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos); @@ -2459,6 +2460,7 @@ static int writeFile(struct file *fp, char *buf, int len) while (sum < len) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) + MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); wlen = kernel_write(fp, buf + sum, len - sum, &fp->f_pos); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) wlen = __vfs_write(fp, buf + sum, len - sum, &fp->f_pos);