Re: WARNING: kobject bug in netdev_queue_update_kobjects
On Mon, 2018-03-05 at 09:59 -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 661e50bc853209e41a5c14a290ca4decc43cbfd1 (Sun Mar 4 22:54:11 2018 > +) > Linux 4.16-rc4 > > So far this crash happened 2 times on upstream. > C reproducer is attached. > syzkaller reproducer is attached. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached. > > IMPORTANT: if you fix the bug, please add the following tag to the > commit: > Reported-by: syzbot+7fb6d9525a4528104...@syzkaller.appspotmail.com > It will help syzbot understand when the bug is fixed. See footer > for > details. > If you forward the report, please keep this part and the footer. > > RBP: 7ffd67c73e10 R08: 0001 R09: 7ffd67c70032 > R10: R11: 0246 R12: 74656e2f7665642f > R13: R14: 0008 R15: > [ cut here ] > kobject_add_internal failed for tx-3 (error: -12 parent: queues) > WARNING: CPU: 1 PID: 4119 at lib/kobject.c:242 > kobject_add_internal+0x3f6/0xbc0 lib/kobject.c:240 > Kernel panic - not syncing: panic_on_warn set ... > > CPU: 1 PID: 4119 Comm: syzkaller952529 Not tainted 4.16.0-rc4+ #341 > Hardware name: Google Google Compute Engine/Google Compute Engine, > BIOS > Google 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:17 [inline] > dump_stack+0x194/0x24d lib/dump_stack.c:53 > panic+0x1e4/0x41c kernel/panic.c:183 > __warn+0x1dc/0x200 kernel/panic.c:547 > report_bug+0x211/0x2d0 lib/bug.c:184 > fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178 > fixup_bug arch/x86/kernel/traps.c:247 [inline] > do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296 > do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315 > invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986 > RIP: 0010:kobject_add_internal+0x3f6/0xbc0 lib/kobject.c:240 > RSP: 0018:8801d2d9f488 EFLAGS: 00010286 > RAX: dc08 RBX: 8801d1ec0618 RCX: 815abb7e > RDX: RSI: 11003a5b3e41 RDI: 11003a5b3e16 > RBP: 8801d2d9f580 R08: 11003a5b3dd8 R09: > R10: 8801d2d9f248 R11: R12: 11003a5b3e97 > R13: fff4 R14: 8801d0ce8d48 R15: 8684c720 > kobject_add_varg lib/kobject.c:364 [inline] > kobject_init_and_add+0xf9/0x150 lib/kobject.c:436 > netdev_queue_add_kobject net/core/net-sysfs.c:1332 [inline] > netdev_queue_update_kobjects+0x148/0x480 net/core/net-sysfs.c:1360 > netif_set_real_num_tx_queues+0x185/0x790 net/core/dev.c:2397 > tun_set_real_num_queues drivers/net/tun.c:638 [inline] > tun_attach+0x7bd/0x1220 drivers/net/tun.c:863 > tun_set_queue drivers/net/tun.c:2750 [inline] > __tun_chr_ioctl+0x8f5/0x40d0 drivers/net/tun.c:2814 > tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:3084 > vfs_ioctl fs/ioctl.c:46 [inline] > do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 > SYSC_ioctl fs/ioctl.c:701 [inline] > SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 > do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 > entry_SYSCALL_64_after_hwframe+0x42/0xb7 > RIP: 0033:0x444229 > RSP: 002b:7ffd67c73e08 EFLAGS: 0246 ORIG_RAX: > 0010 > RAX: ffda RBX: RCX: 00444229 > RDX: 2200 RSI: 400454d9 RDI: 0006 > RBP: 7ffd67c73e10 R08: 0001 R09: 7ffd67c70032 > R10: R11: 0246 R12: 74656e2f7665642f > R13: R14: 0008 R15: > Dumping ftrace buffer: > (ftrace buffer empty) > Kernel Offset: disabled > Rebooting in 86400 seconds.. > > > --- > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkal...@googlegroups.com. > > syzbot will keep track of this bug report. > If you forgot to add the Reported-by tag, once the fix for this bug > is > merged > into any tree, please reply to this email with: > #syz fix: exact-commit-title > If you want to test a patch for this bug, please reply with: > #syz test: git://repo/address.git branch > and provide the patch inline or as an attachment. > To mark this as a duplicate of another syzbot report, please reply > with: > #syz dup: exact-subject-of-another-report > If it's a one-off invalid bug report, please reply with: > #syz invalid > Note: if the crash happens again, it will cause creation of a new > bug > report. > Note: all commands must start from beginning of the line in the email > body. kobject_init_internal() simply is noisy when an error happen (in this case a memory allocation error was injected) It seems it is intended. commit 282029c005e65ffdce3aa9f8220f88a8bbbc4dae Author: Dan WilliamsDate: Fri Apr 6 13:41:15 2012 -0700 kobject: provide more diagnostic info for kobject_add_internal() failures 1/ convert open-coded
Re: WARNING: kobject bug in netdev_queue_update_kobjects
On Mon, 2018-03-05 at 09:59 -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 661e50bc853209e41a5c14a290ca4decc43cbfd1 (Sun Mar 4 22:54:11 2018 > +) > Linux 4.16-rc4 > > So far this crash happened 2 times on upstream. > C reproducer is attached. > syzkaller reproducer is attached. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached. > > IMPORTANT: if you fix the bug, please add the following tag to the > commit: > Reported-by: syzbot+7fb6d9525a4528104...@syzkaller.appspotmail.com > It will help syzbot understand when the bug is fixed. See footer > for > details. > If you forward the report, please keep this part and the footer. > > RBP: 7ffd67c73e10 R08: 0001 R09: 7ffd67c70032 > R10: R11: 0246 R12: 74656e2f7665642f > R13: R14: 0008 R15: > [ cut here ] > kobject_add_internal failed for tx-3 (error: -12 parent: queues) > WARNING: CPU: 1 PID: 4119 at lib/kobject.c:242 > kobject_add_internal+0x3f6/0xbc0 lib/kobject.c:240 > Kernel panic - not syncing: panic_on_warn set ... > > CPU: 1 PID: 4119 Comm: syzkaller952529 Not tainted 4.16.0-rc4+ #341 > Hardware name: Google Google Compute Engine/Google Compute Engine, > BIOS > Google 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:17 [inline] > dump_stack+0x194/0x24d lib/dump_stack.c:53 > panic+0x1e4/0x41c kernel/panic.c:183 > __warn+0x1dc/0x200 kernel/panic.c:547 > report_bug+0x211/0x2d0 lib/bug.c:184 > fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178 > fixup_bug arch/x86/kernel/traps.c:247 [inline] > do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296 > do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315 > invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986 > RIP: 0010:kobject_add_internal+0x3f6/0xbc0 lib/kobject.c:240 > RSP: 0018:8801d2d9f488 EFLAGS: 00010286 > RAX: dc08 RBX: 8801d1ec0618 RCX: 815abb7e > RDX: RSI: 11003a5b3e41 RDI: 11003a5b3e16 > RBP: 8801d2d9f580 R08: 11003a5b3dd8 R09: > R10: 8801d2d9f248 R11: R12: 11003a5b3e97 > R13: fff4 R14: 8801d0ce8d48 R15: 8684c720 > kobject_add_varg lib/kobject.c:364 [inline] > kobject_init_and_add+0xf9/0x150 lib/kobject.c:436 > netdev_queue_add_kobject net/core/net-sysfs.c:1332 [inline] > netdev_queue_update_kobjects+0x148/0x480 net/core/net-sysfs.c:1360 > netif_set_real_num_tx_queues+0x185/0x790 net/core/dev.c:2397 > tun_set_real_num_queues drivers/net/tun.c:638 [inline] > tun_attach+0x7bd/0x1220 drivers/net/tun.c:863 > tun_set_queue drivers/net/tun.c:2750 [inline] > __tun_chr_ioctl+0x8f5/0x40d0 drivers/net/tun.c:2814 > tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:3084 > vfs_ioctl fs/ioctl.c:46 [inline] > do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 > SYSC_ioctl fs/ioctl.c:701 [inline] > SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 > do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 > entry_SYSCALL_64_after_hwframe+0x42/0xb7 > RIP: 0033:0x444229 > RSP: 002b:7ffd67c73e08 EFLAGS: 0246 ORIG_RAX: > 0010 > RAX: ffda RBX: RCX: 00444229 > RDX: 2200 RSI: 400454d9 RDI: 0006 > RBP: 7ffd67c73e10 R08: 0001 R09: 7ffd67c70032 > R10: R11: 0246 R12: 74656e2f7665642f > R13: R14: 0008 R15: > Dumping ftrace buffer: > (ftrace buffer empty) > Kernel Offset: disabled > Rebooting in 86400 seconds.. > > > --- > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkal...@googlegroups.com. > > syzbot will keep track of this bug report. > If you forgot to add the Reported-by tag, once the fix for this bug > is > merged > into any tree, please reply to this email with: > #syz fix: exact-commit-title > If you want to test a patch for this bug, please reply with: > #syz test: git://repo/address.git branch > and provide the patch inline or as an attachment. > To mark this as a duplicate of another syzbot report, please reply > with: > #syz dup: exact-subject-of-another-report > If it's a one-off invalid bug report, please reply with: > #syz invalid > Note: if the crash happens again, it will cause creation of a new > bug > report. > Note: all commands must start from beginning of the line in the email > body. kobject_init_internal() simply is noisy when an error happen (in this case a memory allocation error was injected) It seems it is intended. commit 282029c005e65ffdce3aa9f8220f88a8bbbc4dae Author: Dan Williams Date: Fri Apr 6 13:41:15 2012 -0700 kobject: provide more diagnostic info for kobject_add_internal() failures 1/ convert open-coded KERN_ERR+dump_stack() to WARN(), so