Re: [PATCH v10 0/2] Introduce block device LED trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ian,

with a heavily patched Linux 6.0-rc4 with kfence, kmemleak and slub_debug I get the
following splat at boot:

Sep 07 11:33:11 kernel: =============================================================================
Sep 07 11:33:11 kernel: BUG kmalloc-16 (Not tainted): Object already free
Sep 07 11:33:11 kernel: -----------------------------------------------------------------------------
Sep 07 11:33:11 kernel: Allocated in kernfs_fop_write_iter+0x178/0x200 age=1 cpu=0 pid=453
Sep 07 11:33:11 kernel:  __slab_alloc.constprop.0+0x42/0x80
Sep 07 11:33:11 kernel:  __kmalloc+0x334/0x3a0
Sep 07 11:33:11 kernel:  kernfs_fop_write_iter+0x178/0x200
Sep 07 11:33:11 kernel:  vfs_write+0x268/0x430
Sep 07 11:33:11 kernel:  ksys_write+0x6f/0xf0
Sep 07 11:33:11 kernel:  do_syscall_64+0x5c/0x90
Sep 07 11:33:11 kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Sep 07 11:33:11 kernel: Freed in blkdev_trig_get_bdev+0x47/0x60 [ledtrig_blkdev] age=1 cpu=0 pid=453
Sep 07 11:33:11 kernel:  kfree+0x374/0x3b0
Sep 07 11:33:11 kernel:  blkdev_trig_get_bdev+0x47/0x60 [ledtrig_blkdev]
Sep 07 11:33:11 kernel:  link_dev_by_path_store+0x5c/0x3f0 [ledtrig_blkdev]
Sep 07 11:33:11 kernel:  kernfs_fop_write_iter+0x11f/0x200
Sep 07 11:33:11 kernel:  vfs_write+0x268/0x430
Sep 07 11:33:11 kernel:  ksys_write+0x6f/0xf0
Sep 07 11:33:11 kernel:  do_syscall_64+0x5c/0x90
Sep 07 11:33:11 kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Sep 07 11:33:11 kernel: Slab 0xffffeb91446ad1c0 objects=32 used=31 fp=0xffff912c1ab47b10 flags=0x4000000000000201(locked|slab|zone=2)
Sep 07 11:33:11 kernel: Object 0xffff912c1ab47b10 @offset=2832 fp=0x0000000000000000
Sep 07 11:33:11 kernel: Redzone  ffff912c1ab47b00: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
Sep 07 11:33:11 kernel: Object   ffff912c1ab47b10: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  kkkkkkkkkkkkkkk.
Sep 07 11:33:11 kernel: Redzone  ffff912c1ab47b20: bb bb bb bb bb bb bb bb                          ........
Sep 07 11:33:11 kernel: Padding  ffff912c1ab47b70: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[...]
Sep 07 11:33:11 kernel: Call Trace:
Sep 07 11:33:11 kernel:  <TASK>
Sep 07 11:33:11 kernel:  dump_stack_lvl+0x37/0x4a
Sep 07 11:33:11 kernel:  object_err+0x2f/0x42
Sep 07 11:33:11 kernel:  free_debug_processing.cold+0x9c/0x126
Sep 07 11:33:11 kernel:  ? kernfs_fop_write_iter+0xa0/0x200
Sep 07 11:33:11 kernel:  __slab_free+0x265/0x450
Sep 07 11:33:11 kernel:  ? _raw_spin_lock_irqsave+0x1b/0x50
Sep 07 11:33:11 kernel:  ? _raw_spin_unlock_irqrestore+0x22/0x40
Sep 07 11:33:11 kernel:  ? kernfs_fop_write_iter+0xa0/0x200
Sep 07 11:33:11 kernel:  kfree+0x374/0x3b0
Sep 07 11:33:11 kernel:  kernfs_fop_write_iter+0xa0/0x200
Sep 07 11:33:11 kernel:  vfs_write+0x268/0x430
Sep 07 11:33:11 kernel:  ksys_write+0x6f/0xf0
Sep 07 11:33:11 kernel:  do_syscall_64+0x5c/0x90
Sep 07 11:33:11 kernel:  ? do_syscall_64+0x6b/0x90
Sep 07 11:33:11 kernel:  ? do_syscall_64+0x6b/0x90
Sep 07 11:33:11 kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Sep 07 11:33:11 kernel: RIP: 0033:0x74dc50050e94
Sep 07 11:33:11 kernel: Code: 15 f9 0e 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 80 3d 8d 96 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3>
Sep 07 11:33:11 kernel: RSP: 002b:00007fff526d4058 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
Sep 07 11:33:11 kernel: RAX: ffffffffffffffda RBX: 000000000000000c RCX: 000074dc50050e94
Sep 07 11:33:11 kernel: RDX: 000000000000000c RSI: 0000620ac0072430 RDI: 0000000000000005
Sep 07 11:33:11 kernel: RBP: 0000620ac0072430 R08: 0000620ac00852a0 R09: 007265776f703a3a
Sep 07 11:33:11 kernel: R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000005
Sep 07 11:33:11 kernel: R13: 0000000000000000 R14: 0000000000000005 R15: 0000620ac00852a0
Sep 07 11:33:11 kernel:  </TASK>
Sep 07 11:33:11 kernel: Disabling lock debugging due to kernel taint
Sep 07 11:33:11 kernel: FIX kmalloc-16: Object at 0xffff912c1ab47b10 not freed

I'm not 100% sure if this is an issue with ledtrig_blkdev or something else,
but I thought I'll let you know about it.
I have not been able to test this on a vanilla kernel yet.

Other than that, I hope this patchset gets included in upstream.
I have been using it for a long time now and found it very useful.

Cheers,
Tor



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux