Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile os/linux/zfs/zfs_ioctl_os.c with clang lto #11987

Closed
12101111 opened this issue May 1, 2021 · 1 comment
Closed

Failed to compile os/linux/zfs/zfs_ioctl_os.c with clang lto #11987

12101111 opened this issue May 1, 2021 · 1 comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@12101111
Copy link
Contributor

12101111 commented May 1, 2021

System information

Type Version/Name
Distribution Name Gentoo Linux
Distribution Version ~amd64
Linux Kernel 5.12.0
Architecture amd64
ZFS Version 2.1.0-rc4
SPL Version 2.1.0-rc4

Describe the problem you're observing

> make LLVM=1 LLVM_IAS=1 -j13
  DESCEND  objtool
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.o
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: pasting formed ')6', an invalid preprocessing token
module_init(_init);
^
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/init.h:201:2: note: expanded from macro '__initcall_name'
        __PASTE(__iid, id))))
        ^
./include/linux/compiler_types.h:60:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
                     ^
./include/linux/compiler_types.h:59:24: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                       ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: pasting formed ')6', an invalid preprocessing token
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/init.h:201:2: note: expanded from macro '__initcall_name'
        __PASTE(__iid, id))))
        ^
./include/linux/compiler_types.h:60:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
                     ^
./include/linux/compiler_types.h:59:24: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                       ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected parameter declarator
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/compiler_types.h:59:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                      ^
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:27: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected ')'
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/compiler_types.h:59:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                      ^
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:27: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: note: to match this '('
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:67: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
module_init(_init);
^
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:56: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                       ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:67: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected function body after function declarator
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:52: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                                              ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected parameter declarator
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/compiler_types.h:59:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                      ^
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:27: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected ')'
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/compiler_types.h:59:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                      ^
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:27: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: note: to match this '('
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:67: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
module_init(_init);
^
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:56: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                       ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
<scratch space>:217:1: note: expanded from here
__init
^
./include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init          __section(".init.text") __cold  __latent_entropy __noinitretpoline
                        ^
./include/linux/compiler_attributes.h:263:67: note: expanded from macro '__section'
#define __section(section)              __attribute__((__section__(section)))
                                                                  ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: expected function body after function declarator
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:52: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                                              ^
12 errors generated.
make[3]: *** [scripts/Makefile.build:271: fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.o] Error 1
make[2]: *** [scripts/Makefile.build:514: fs/zfs/zfs] Error 2
make[1]: *** [scripts/Makefile.build:514: fs/zfs] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1851: fs] Error 2
make: *** Waiting for unfinished jobs....

Describe how to reproduce the problem

Enable CONFIG_LTO_CLANG_THIN

Include any warning/errors/backtraces from the system logs

Run this command:

clang -nostdinc -isystem /usr/lib/llvm/12/bin/../../../../lib/clang/12.0.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -include ./include/zfs/zfs_config.h -I./include/zfs/os/linux/kernel -I./include/zfs/os/linux/spl -I./include/zfs/os/linux/zfs -I./include/zfs -D_KERNEL -UDEBUG -DNDEBUG -DKBUILD_MODFILE='"fs/zfs/zfs/zfs"' -DKBUILD_BASENAME='"zfs_ioctl_os"' -DKBUILD_MODNAME='"zfs"' -D__KBUILD_MODNAME=kmod_zfs -c -E fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c

stderr:

fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: pasting formed ')6', an invalid preprocessing token
module_init(_init);
^
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/init.h:201:2: note: expanded from macro '__initcall_name'
        __PASTE(__iid, id))))
        ^
./include/linux/compiler_types.h:60:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
                     ^
./include/linux/compiler_types.h:59:24: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                       ^
fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c:322:1: error: pasting formed ')6', an invalid preprocessing token
./include/linux/module.h:86:24: note: expanded from macro 'module_init'
#define module_init(x)  __initcall(x);
                        ^
./include/linux/init.h:295:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
                       ^
./include/linux/init.h:290:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn)             __define_initcall(fn, 6)
                                        ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/linux/init.h:201:2: note: expanded from macro '__initcall_name'
        __PASTE(__iid, id))))
        ^
./include/linux/compiler_types.h:60:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
                     ^
./include/linux/compiler_types.h:59:24: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
                       ^
2 errors generated.

end of stdout:

static void __attribute__((__section__(".exit.text"))) __attribute__((__used__)) __attribute__((__cold__)) __attribute__((no_instrument_function))
_fini(void)
{
 zfs_sysfs_fini();
 zfs_kmod_fini();

 printk("\001" "5" "ZFS: Unloaded module v%s-%s%s\n",
     "2.1.0", "rc4", "");
}


int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6(void); int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6(void) { return _init(); } static void * __attribute__((__section__(".discard.addressable"))) __attribute__((__used__)) __UNIQUE_ID___addressable___initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6397 = (void *)&__initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6; asm(".section      \"" ".initcall6" ".init.." "kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))" "\", \"a\"         \n" "__initcall__kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))6" ":                   \n" ".long      " "__initstub__kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))6" " - .  \n" ".previous                                  \n");;;               
static exitcall_t __exitcall__fini __attribute__((__used__)) __attribute__((__section__(".exitcall.exit"))) = _fini;;


static const char __UNIQUE_ID_description398[] __attribute__((__used__)) __attribute__((__section__(".modinfo"))) __attribute__((__aligned__(1))) = "zfs" "." "description" "=" "ZFS";
static const char __UNIQUE_ID_author399[] __attribute__((__used__)) __attribute__((__section__(".modinfo"))) __attribute__((__aligned__(1))) = "zfs" "." "author" "=" "OpenZFS";
static const char __UNIQUE_ID_file400[] __attribute__((__used__)) __attribute__((__section__(".modinfo"))) __attribute__((__aligned__(1))) = "zfs" "." "file" "=" "fs/zfs/zfs/zfs"; static const char __UNIQUE_ID_license401[] __attribute__((__used__)) __attribute__((__section__(".modinfo"))) __attribute__((__aligned__(1))) = "zfs" "." "license" "=" "CDDL";
static const char __UNIQUE_ID_version402[] __attribute__((__used__)) __attribute__((__section__(".modinfo"))) __attribute__((__aligned__(1))) = "zfs" "." "version" "=" "2.1.0" "-" "rc4"; static struct module_version_attribute __modver_attr __attribute__((__used__)) __attribute__((__section__("__modver"))) __attribute__((__aligned__(__alignof__(struct module_version_attribute)))) = { .mattr = { .attr = { .name = "version", .mode = (00400|00040|00004), }, .show = __modver_version_show, }, .module_name = "zfs", .version = "2.1.0" "-" "rc4", };

The broken line is

int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6(void); int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6(void) { return _init(); } static void * __attribute__((__section__(".discard.addressable"))) __attribute__((__used__)) __UNIQUE_ID___addressable___initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6397 = (void *)&__initstub__kmod_zfs__396_322__attribute__((__section__(".init.text"))) __attribute__((__cold__))6; asm(".section      \"" ".initcall6" ".init.." "kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))" "\", \"a\"         \n" "__initcall__kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))6" ":                   \n" ".long      " "__initstub__kmod_zfs__396_322__attribute__((__section__(\".init.text\"))) __attribute__((__cold__))6" " - .  \n" ".previous                                  \n");;;               

Format by hand:

int __attribute__(
    (__section__
        (".init.text")
    )
) 
__attribute__(
    (__cold__)
)
__initstub__kmod_zfs__396_322__attribute__(
    (__section__
        (".init.text")
    )
)
__attribute__(
    (__cold__)
)6(void); 

int __attribute__(
    (__section__
        (".init.text")
    )
) 
__attribute__(
    (__cold__)
)
__initstub__kmod_zfs__396_322__attribute__(
    (__section__
        (".init.text")
    )
)
__attribute__(
    (__cold__)
)6(void) {
    return _init(); 
} 

static void * __attribute__(
    (
        __section__(".discard.addressable")
    )
)
__attribute__(
    (__used__)
)
__UNIQUE_ID___addressable___initstub__kmod_zfs__396_322__attribute__(
    (__section__
        (".init.text")
    )
)
__attribute__(
    (__cold__)
)
6397 = (void *)&__initstub__kmod_zfs__396_322__attribute__(
    (__section__
        (".init.text")
    )
)
__attribute__(
    (__cold__)
)6;

asm(
    ".section      \""
    ".initcall6"
    ".init.."
    "kmod_zfs__396_322__attribute__(
        (__section__
            (\".init.text\")
        )
    ) __attribute__((__cold__))"
    "\", \"a\"         \n"
    "__initcall__kmod_zfs__396_322__attribute__(
        (__section__
            (\".init.text\")
        )
    ) __attribute__((__cold__))6"
    ":                   \n"
    ".long      "
    "__initstub__kmod_zfs__396_322__attribute__(
        (__section__
            (\".init.text\")
        )
    ) __attribute__((__cold__))6"
    " - .  \n"
    ".previous                                  \n"
);;;
@12101111 12101111 added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels May 1, 2021
@ensch
Copy link

ensch commented May 4, 2021

This does not seem be related to clang. I get the same error with gcc 11.1.0.

Just renaming the _init function to something else, so that the macro expansion does not confuse it with __init, fixes the problem for me.

--- fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c      2021-05-04 18:43:53.535888774 -0000
+++ fs/zfs/zfs/../os/linux/zfs/zfs_ioctl_os.c   2021-05-04 18:27:06.483643681 -0000
@@ -283,7 +283,7 @@
 #endif

 static int __init
-_init(void)
+openzfs_init(void)
 {
        int error;

@@ -319,7 +319,7 @@
 }

 #if defined(_KERNEL)
-module_init(_init);
+module_init(openzfs_init);
 module_exit(_fini);
 #endif

rincebrain added a commit to rincebrain/zfs that referenced this issue May 16, 2021
Closes: openzfs#11987
Closes: openzfs#12056

Suggested-by: @ensch
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
rincebrain added a commit to rincebrain/zfs that referenced this issue May 17, 2021
Renamed _fini too for symmetry.

Closes: openzfs#11987
Closes: openzfs#12056

Suggested-by: @ensch
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
behlendorf pushed a commit to behlendorf/zfs that referenced this issue May 28, 2021
Renamed _fini too for symmetry.

Suggested-by: @ensch
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12059
Closes: openzfs#11987
Closes: openzfs#12056
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
Renamed _fini too for symmetry.

Suggested-by: @ensch
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12059
Closes: openzfs#11987
Closes: openzfs#12056
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jun 10, 2021
Renamed _fini too for symmetry.

Suggested-by: @ensch
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12059
Closes: openzfs#11987
Closes: openzfs#12056
tonyhutter pushed a commit that referenced this issue Jun 23, 2021
Renamed _fini too for symmetry.

Suggested-by: @ensch
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12059
Closes: #11987
Closes: #12056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants