linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [kernel?] possible deadlock in exit_itimers
@ 2023-06-16 18:52 syzbot
  2023-06-17  5:14 ` syzbot
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2023-06-16 18:52 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, tglx

Hello,

syzbot found the following issue on:

HEAD commit:    f7efed9f38f8 Add linux-next specific files for 20230616
git tree:       linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=124a65f7280000
kernel config:  https://syzkaller.appspot.com/x/.config?x=60b1a32485a77c16
dashboard link: https://syzkaller.appspot.com/bug?extid=5fd924f4cd9dc1c7828c
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1401d8ef280000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=176b45cf280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/95bcbee03439/disk-f7efed9f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6fd295caa4de/vmlinux-f7efed9f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/69c038a34b5f/bzImage-f7efed9f.xz

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

============================================
WARNING: possible recursive locking detected
6.4.0-rc6-next-20230616-syzkaller #0 Not tainted
--------------------------------------------
syz-executor196/6178 is trying to acquire lock:
ffff88801eccb640 (&new_timer->it_lock){-.-.}-{2:2}, at: itimer_delete kernel/time/posix-timers.c:1049 [inline]
ffff88801eccb640 (&new_timer->it_lock){-.-.}-{2:2}, at: exit_itimers+0x2ac/0x540 kernel/time/posix-timers.c:1109

but task is already holding lock:
ffff88801eccb640 (&new_timer->it_lock){-.-.}-{2:2}, at: __lock_timer+0x1cc/0x4d0 kernel/time/posix-timers.c:595

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&new_timer->it_lock);
  lock(&new_timer->it_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by syz-executor196/6178:
 #0: ffff88801eccb640 (&new_timer->it_lock){-.-.}-{2:2}, at: __lock_timer+0x1cc/0x4d0 kernel/time/posix-timers.c:595

stack backtrace:
CPU: 1 PID: 6178 Comm: syz-executor196 Not tainted 6.4.0-rc6-next-20230616-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
 check_deadlock kernel/locking/lockdep.c:3070 [inline]
 validate_chain kernel/locking/lockdep.c:3863 [inline]
 __lock_acquire+0x2a33/0x5e20 kernel/locking/lockdep.c:5144
 lock_acquire.part.0+0x11c/0x370 kernel/locking/lockdep.c:5761
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162
 itimer_delete kernel/time/posix-timers.c:1049 [inline]
 exit_itimers+0x2ac/0x540 kernel/time/posix-timers.c:1109
 do_exit+0x630/0x2a30 kernel/exit.c:848
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024
 __do_sys_exit_group kernel/exit.c:1035 [inline]
 __se_sys_exit_group kernel/exit.c:1033 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f5dc8cc4dd9
Code: 00 49 c7 c0 b8 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 12 0f 1f 44 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00
RSP: 002b:00007ffe0c959208 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f5dc8d4f210 RCX: 00007f5dc8cc4dd9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffb8 R09: 00007f5dc8d151cf
R10: 00007ffe0c959290 R11: 0000000000000246 R12: 00007f5dc8d4f210
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>


---
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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

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

* Re: [syzbot] [kernel?] possible deadlock in exit_itimers
  2023-06-16 18:52 [syzbot] [kernel?] possible deadlock in exit_itimers syzbot
@ 2023-06-17  5:14 ` syzbot
  2023-06-18 20:44   ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2023-06-17  5:14 UTC (permalink / raw)
  To: frederic, linux-kernel, syzkaller-bugs, tglx

syzbot has bisected this issue to:

commit 1b59b2577582f9cf3d0f17245675a76859175cc1
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Thu Jun 1 20:16:34 2023 +0000

    posix-timers: Prevent RT livelock in itimer_delete()

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=106d46e3280000
start commit:   f7efed9f38f8 Add linux-next specific files for 20230616
git tree:       linux-next
final oops:     https://syzkaller.appspot.com/x/report.txt?x=126d46e3280000
console output: https://syzkaller.appspot.com/x/log.txt?x=146d46e3280000
kernel config:  https://syzkaller.appspot.com/x/.config?x=60b1a32485a77c16
dashboard link: https://syzkaller.appspot.com/bug?extid=5fd924f4cd9dc1c7828c
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1401d8ef280000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=176b45cf280000

Reported-by: syzbot+5fd924f4cd9dc1c7828c@syzkaller.appspotmail.com
Fixes: 1b59b2577582 ("posix-timers: Prevent RT livelock in itimer_delete()")

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

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

* Re: [syzbot] [kernel?] possible deadlock in exit_itimers
  2023-06-17  5:14 ` syzbot
@ 2023-06-18 20:44   ` Thomas Gleixner
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2023-06-18 20:44 UTC (permalink / raw)
  To: syzbot, frederic, linux-kernel, syzkaller-bugs

On Fri, Jun 16 2023 at 22:14, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 1b59b2577582f9cf3d0f17245675a76859175cc1
> Author: Thomas Gleixner <tglx@linutronix.de>
> Date:   Thu Jun 1 20:16:34 2023 +0000
>
>     posix-timers: Prevent RT livelock in itimer_delete()
>
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=106d46e3280000
> start commit:   f7efed9f38f8 Add linux-next specific files for 20230616
> git tree:       linux-next
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=126d46e3280000
> console output: https://syzkaller.appspot.com/x/log.txt?x=146d46e3280000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=60b1a32485a77c16
> dashboard link: https://syzkaller.appspot.com/bug?extid=5fd924f4cd9dc1c7828c
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1401d8ef280000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=176b45cf280000
>
> Reported-by: syzbot+5fd924f4cd9dc1c7828c@syzkaller.appspotmail.com
> Fixes: 1b59b2577582 ("posix-timers: Prevent RT livelock in itimer_delete()")

I've amended the original commit as that is tagged stable.

Thanks for chatching this and reporting!

       tglx

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

* Re: [syzbot] [kernel?] possible deadlock in exit_itimers
       [not found] <20230617074659.4760-1-hdanton@sina.com>
@ 2023-06-17  9:50 ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2023-06-17  9:50 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+5fd924f4cd9dc1c7828c@syzkaller.appspotmail.com

Tested on:

commit:         f7efed9f Add linux-next specific files for 20230616
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=11bddabb280000
kernel config:  https://syzkaller.appspot.com/x/.config?x=60b1a32485a77c16
dashboard link: https://syzkaller.appspot.com/bug?extid=5fd924f4cd9dc1c7828c
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch:          https://syzkaller.appspot.com/x/patch.diff?x=12be8d37280000

Note: testing is done by a robot and is best-effort only.

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

end of thread, other threads:[~2023-06-18 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 18:52 [syzbot] [kernel?] possible deadlock in exit_itimers syzbot
2023-06-17  5:14 ` syzbot
2023-06-18 20:44   ` Thomas Gleixner
     [not found] <20230617074659.4760-1-hdanton@sina.com>
2023-06-17  9:50 ` syzbot

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).