I see a crash in dmesg if I do twice “modprobe my_module”. On the terminal I see always the same error message: “modprobe: ERROR: could not insert 'my_module': Device or resource busy “. "lsmod | grep my_module" returns always no results The first time I see in dmesg: [ 719.768057] my_module: module verification failed: signature and/or required key missing - tainting kernel [ 719.768358] my_module_init_struct: Phys start e3000000, start f9600000, nc-start f9a00000 The second time I see: [ 1576.030967] perf interrupt took too long (5001 > 5000), lowering kernel.perf_event_max_sample_rate to 25000 [43637.770909] my_module_init_struct: Phys start e3000000, start f9e00000, nc-start fa200000 [43638.998400] ------------[ cut here ]------------ [43638.998415] WARNING: CPU: 0 PID: 3862 at /build/linux-5Vy7q8/linux-4.4.0/fs/sysfs/dir.c:31 sysfs_warn_dup+0x60/0x70() [43638.998418] sysfs: cannot create duplicate filename '/class/my_module' [43638.998419] Modules linked in: my_module(OE+) lirc_dev rc_core jfs gpio_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel coretemp kvm_intel snd_hda_codec snd_hda_core snd_hwdep kvm snd_pcm snd_seq_midi snd_seq_midi_event irqbypass snd_rawmidi snd_seq input_leds snd_seq_device snd_timer lpc_ich serio_raw snd soundcore shpchp 8250_fintek mac_hid hwmon_vid sunrpc eeprom parport_pc ppdev lp parport autofs4 uvesafb uas usb_storage psmouse ahci firewire_ohci i915 libahci firewire_core crc_itu_t pata_acpi video i2c_algo_bit r8169 drm_kms_helper fjes syscopyarea sysfillrect sysimgblt mii fb_sys_fops drm [43638.998471] CPU: 0 PID: 3862 Comm: modprobe Tainted: G OE 4.4.0-59-generic #80-Ubuntu [43638.998473] Hardware name: Kontron Technology 986LCD-M/mITX/986LCD-M/mITX, BIOS 080013 03/04/2011 [43638.998476] c1ad7967 1c7090b8 00000286 f17b7c64 c13ab85f f17b7ca4 c19f07a8 f17b7c94 [43638.998481] c1070427 c19f0774 f17b7cc4 00000f16 c19f07a8 0000001f c1250120 c1250120 [43638.998487] f1112000 f20e1400 f63ac1b0 f17b7cb0 c107049e 00000009 f17b7ca4 c19f0774 [43638.998492] Call Trace: [43638.998500] [] dump_stack+0x58/0x79 [43638.998505] [] warn_slowpath_common+0x87/0xc0 [43638.998508] [] ? sysfs_warn_dup+0x60/0x70 [43638.998511] [] ? sysfs_warn_dup+0x60/0x70 [43638.998514] [] warn_slowpath_fmt+0x3e/0x60 [43638.998517] [] sysfs_warn_dup+0x60/0x70 [43638.998520] [] sysfs_create_dir_ns+0x78/0x90 [43638.998524] [] kobject_add_internal+0xa1/0x360 [43638.998528] [] ? kfree_const+0x25/0x30 [43638.998531] [] kset_register+0x3c/0x60 [43638.998535] [] __class_register+0xc2/0x1e0 [43638.998538] [] ? __class_create+0x28/0x70 [43638.998541] [] __class_create+0x44/0x70 [43638.998544] [] ? 0xf8e21000 [43638.998549] [] my_module_init+0x40/0x1000 [my_module] [43638.998553] [] do_one_initcall+0xaa/0x200 [43638.998555] [] ? 0xf8e21000 [43638.998560] [] ? free_vmap_area_noflush+0x45/0xa0 [43638.998564] [] ? kmem_cache_alloc_trace+0x185/0x1e0 [43638.998568] [] ? do_init_module+0x21/0x1a6 [43638.998571] [] ? do_init_module+0x21/0x1a6 [43638.998574] [] do_init_module+0x50/0x1a6 [43638.998579] [] load_module+0x1533/0x1a40 [43638.998583] [] ? copy_module_from_fd.isra.53+0xf9/0x190 [43638.998586] [] SyS_finit_module+0xa5/0xf0 [43638.998589] [] ? vm_mmap_pgoff+0xa3/0xc0 [43638.998593] [] do_fast_syscall_32+0x8d/0x150 [43638.998598] [] sysenter_past_esp+0x3d/0x61 [43638.998600] ---[ end trace 1e884c0f3bc9cdbd ]--- [43638.998602] ------------[ cut here ]------------ [43638.998606] WARNING: CPU: 0 PID: 3862 at /build/linux-5Vy7q8/linux-4.4.0/lib/kobject.c:240 kobject_add_internal+0x2e2/0x360() [43638.998609] kobject_add_internal failed for my_module with -EEXIST, don't try to register things with the same name in the same directory. [43638.998610] Modules linked in: my_module(OE+) lirc_dev rc_core jfs gpio_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel coretemp kvm_intel snd_hda_codec snd_hda_core snd_hwdep kvm snd_pcm snd_seq_midi snd_seq_midi_event irqbypass snd_rawmidi snd_seq input_leds snd_seq_device snd_timer lpc_ich serio_raw snd soundcore shpchp 8250_fintek mac_hid hwmon_vid sunrpc eeprom parport_pc ppdev lp parport autofs4 uvesafb uas usb_storage psmouse ahci firewire_ohci i915 libahci firewire_core crc_itu_t pata_acpi video i2c_algo_bit r8169 drm_kms_helper fjes syscopyarea sysfillrect sysimgblt mii fb_sys_fops drm [43638.998646] CPU: 0 PID: 3862 Comm: modprobe Tainted: G W OE 4.4.0-59-generic #80-Ubuntu [43638.998648] Hardware name: Kontron Technology 986LCD-M/mITX/986LCD-M/mITX, BIOS 080013 03/04/2011 [43638.998650] c1ad7967 1c7090b8 00000286 f17b7ca8 c13ab85f f17b7ce8 c1a0bfe0 f17b7cd8 [43638.998655] c1070427 c1a0c218 f17b7d08 00000f16 c1a0bfe0 000000f0 c13ae772 c13ae772 [43638.998660] f2444d0c ffffffef 00000000 f17b7cf4 c107049e 00000009 f17b7ce8 c1a0c218 [43638.998665] Call Trace: [43638.998668] [] dump_stack+0x58/0x79 [43638.998672] [] warn_slowpath_common+0x87/0xc0 [43638.998675] [] ? kobject_add_internal+0x2e2/0x360 [43638.998677] [] ? kobject_add_internal+0x2e2/0x360 [43638.998680] [] warn_slowpath_fmt+0x3e/0x60 [43638.998683] [] kobject_add_internal+0x2e2/0x360 [43638.998686] [] kset_register+0x3c/0x60 [43638.998689] [] __class_register+0xc2/0x1e0 [43638.998692] [] ? __class_create+0x28/0x70 [43638.998694] [] __class_create+0x44/0x70 [43638.998696] [] ? 0xf8e21000 [43638.998700] [] my_module_init+0x40/0x1000 [my_module] [43638.998703] [] do_one_initcall+0xaa/0x200 [43638.998705] [] ? 0xf8e21000 [43638.998708] [] ? free_vmap_area_noflush+0x45/0xa0 [43638.998711] [] ? kmem_cache_alloc_trace+0x185/0x1e0 [43638.998714] [] ? do_init_module+0x21/0x1a6 [43638.998717] [] ? do_init_module+0x21/0x1a6 [43638.998720] [] do_init_module+0x50/0x1a6 [43638.998723] [] load_module+0x1533/0x1a40 [43638.998727] [] ? copy_module_from_fd.isra.53+0xf9/0x190 [43638.998730] [] SyS_finit_module+0xa5/0xf0 [43638.998733] [] ? vm_mmap_pgoff+0xa3/0xc0 [43638.998736] [] do_fast_syscall_32+0x8d/0x150 [43638.998739] [] sysenter_past_esp+0x3d/0x61 [43638.998742] ---[ end trace 1e884c0f3bc9cdbe ]---