linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNING: ODEBUG bug in get_signal
@ 2020-08-27  7:58 syzbot
  2020-08-27 11:14 ` syzbot
  2020-08-27 11:24 ` Oleg Nesterov
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2020-08-27  7:58 UTC (permalink / raw)
  To: axboe, linux-kernel, oleg, peterz, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    15bc20c6 Merge tag 'tty-5.9-rc3' of git://git.kernel.org/p..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1566d8fe900000
kernel config:  https://syzkaller.appspot.com/x/.config?x=978db74cb30aa994
dashboard link: https://syzkaller.appspot.com/bug?extid=e3cf8f93cf86936710db
compiler:       gcc (GCC) 10.1.0-syz 20200507
userspace arch: i386
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13236eb6900000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e3cf8f93cf86936710db@syzkaller.appspotmail.com

------------[ cut here ]------------
ODEBUG: free active (active state 1) object type: rcu_head hint: 0x0
WARNING: CPU: 1 PID: 7108 at lib/debugobjects.c:485 debug_print_object+0x160/0x250 lib/debugobjects.c:485
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 7108 Comm: syz-executor.0 Not tainted 5.9.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18f/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:231
 __warn.cold+0x20/0x4a kernel/panic.c:600
 report_bug+0x1bd/0x210 lib/bug.c:198
 handle_bug+0x38/0x90 arch/x86/kernel/traps.c:234
 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536
RIP: 0010:debug_print_object+0x160/0x250 lib/debugobjects.c:485
Code: dd e0 26 94 88 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 bf 00 00 00 48 8b 14 dd e0 26 94 88 48 c7 c7 40 1c 94 88 e8 d2 36 a6 fd <0f> 0b 83 05 93 4f 13 07 01 48 83 c4 20 5b 5d 41 5c 41 5d c3 48 89
RSP: 0018:ffffc900068a7b80 EFLAGS: 00010086
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: ffff888090f64140 RSI: ffffffff815dafc7 RDI: fffff52000d14f62
RBP: 0000000000000001 R08: 0000000000000001 R09: ffff8880ae720f8b
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff89bd6780
R13: 0000000000000000 R14: dead000000000100 R15: dffffc0000000000
 __debug_check_no_obj_freed lib/debugobjects.c:967 [inline]
 debug_check_no_obj_freed+0x301/0x41c lib/debugobjects.c:998
 kmem_cache_free.part.0+0x16d/0x1f0 mm/slab.c:3692
 task_work_run+0xdd/0x190 kernel/task_work.c:141
 get_signal+0xd89/0x1f00 kernel/signal.c:2561
 arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811
 exit_to_user_mode_loop kernel/entry/common.c:136 [inline]
 exit_to_user_mode_prepare+0x15d/0x1c0 kernel/entry/common.c:167
 syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:242
 __do_fast_syscall_32+0x63/0x80 arch/x86/entry/common.c:127
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:149
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7f05549
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000f76ff0cc EFLAGS: 00000296 ORIG_RAX: 00000000000000ff
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000001
RDX: 0000000000000006 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WARNING: ODEBUG bug in get_signal
  2020-08-27  7:58 WARNING: ODEBUG bug in get_signal syzbot
@ 2020-08-27 11:14 ` syzbot
  2020-08-27 11:24 ` Oleg Nesterov
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2020-08-27 11:14 UTC (permalink / raw)
  To: alsa-devel, arnd, axboe, baolin.wang, linux-fsdevel,
	linux-kernel, maz, oleg, perex, peterz, syzkaller-bugs, tiwai,
	viro

syzbot has bisected this issue to:

commit a9ed4a6560b8562b7e2e2bed9527e88001f7b682
Author: Marc Zyngier <maz@kernel.org>
Date:   Wed Aug 19 16:12:17 2020 +0000

    epoll: Keep a reference on files added to the check list

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=15e57751900000
start commit:   15bc20c6 Merge tag 'tty-5.9-rc3' of git://git.kernel.org/p..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=17e57751900000
console output: https://syzkaller.appspot.com/x/log.txt?x=13e57751900000
kernel config:  https://syzkaller.appspot.com/x/.config?x=978db74cb30aa994
dashboard link: https://syzkaller.appspot.com/bug?extid=e3cf8f93cf86936710db
userspace arch: i386
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13236eb6900000

Reported-by: syzbot+e3cf8f93cf86936710db@syzkaller.appspotmail.com
Fixes: a9ed4a6560b8 ("epoll: Keep a reference on files added to the check list")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WARNING: ODEBUG bug in get_signal
  2020-08-27  7:58 WARNING: ODEBUG bug in get_signal syzbot
  2020-08-27 11:14 ` syzbot
@ 2020-08-27 11:24 ` Oleg Nesterov
  1 sibling, 0 replies; 3+ messages in thread
From: Oleg Nesterov @ 2020-08-27 11:24 UTC (permalink / raw)
  To: syzbot; +Cc: axboe, linux-kernel, peterz, syzkaller-bugs

On 08/27, syzbot wrote:
>
>  __debug_check_no_obj_freed lib/debugobjects.c:967 [inline]
>  debug_check_no_obj_freed+0x301/0x41c lib/debugobjects.c:998
>  kmem_cache_free.part.0+0x16d/0x1f0 mm/slab.c:3692
>  task_work_run+0xdd/0x190 kernel/task_work.c:141

I don't understand this trace, work->func(work) can call kmem_cache_free()
but task_work_run() doesn't do this.

In theory the patch below makes sense anyway, but I have no idea if it can
explain the problem.

Oleg.

--- x/kernel/task_work.c
+++ x/kernel/task_work.c
@@ -137,7 +137,7 @@ void task_work_run(void)
 		raw_spin_unlock_irq(&task->pi_lock);
 
 		do {
-			next = work->next;
+			next = READ_ONCE(work->next);
 			work->func(work);
 			work = next;
 			cond_resched();


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-27 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  7:58 WARNING: ODEBUG bug in get_signal syzbot
2020-08-27 11:14 ` syzbot
2020-08-27 11:24 ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).