linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] WARNING in atp_close (3)
@ 2021-10-03  0:00 syzbot
  2021-10-23  0:38 ` syzbot
  2021-12-30 13:12 ` Pavel Skripkin
  0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2021-10-03  0:00 UTC (permalink / raw)
  To: dmitry.torokhov, linux-input, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    bf5b1e621a51 Add linux-next specific files for 20210927
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11cc5bd3300000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4b58fe22c337ee4a
dashboard link: https://syzkaller.appspot.com/bug?extid=b88c5eae27386b252bbd
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 11843 at kernel/workqueue.c:3074 __flush_work+0x928/0xb10 kernel/workqueue.c:3074
Modules linked in:
CPU: 1 PID: 11843 Comm: syz-executor.3 Not tainted 5.15.0-rc3-next-20210927-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__flush_work+0x928/0xb10 kernel/workqueue.c:3074
Code: ff 41 89 c4 89 8d 88 fe ff ff e8 a3 67 70 00 48 0f ba 2b 03 e9 6a fa ff ff e8 e4 1e 2a 00 0f 0b e9 5a fc ff ff e8 d8 1e 2a 00 <0f> 0b 45 31 f6 e9 4b fc ff ff e8 f9 63 70 00 e9 3a fb ff ff e8 bf
RSP: 0018:ffffc90005887b38 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801a7a9290 RCX: 0000000000000000
RDX: ffff88801f37d700 RSI: ffffffff814c22c8 RDI: 0000000000000003
RBP: ffffc90005887cd0 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff814c1a45 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff92000b10f9d R14: 0000000000000001 R15: ffff88801a7a92a8
FS:  0000555555bf1400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007eff33b21000 CR3: 000000001a6b9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3170
 atp_close+0x5e/0xa0 drivers/input/mouse/appletouch.c:812
 input_close_device+0x156/0x1f0 drivers/input/input.c:687
 evdev_close_device drivers/input/evdev.c:414 [inline]
 evdev_release+0x34c/0x410 drivers/input/evdev.c:456
 __fput+0x288/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7eff339d351b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffc6d17d160 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007eff339d351b
RDX: 00007eff33b291e0 RSI: ffffffff89327541 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d422e74
R10: 0000000000001f81 R11: 0000000000000293 R12: 0000000000043109
R13: 00000000000003e8 R14: 00007eff33b24f60 R15: 0000000000042b7f
 </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.

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

* Re: [syzbot] WARNING in atp_close (3)
  2021-10-03  0:00 [syzbot] WARNING in atp_close (3) syzbot
@ 2021-10-23  0:38 ` syzbot
  2021-12-30 13:12 ` Pavel Skripkin
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2021-10-23  0:38 UTC (permalink / raw)
  To: dmitry.torokhov, fgheet255t, linux-input, linux-kernel,
	linux-usb, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    c26f1c109d21 usb: gadget: configfs: change config attribut..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=16cdc5f0b00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e163c2f9cde7dc45
dashboard link: https://syzkaller.appspot.com/bug?extid=b88c5eae27386b252bbd
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=12a36864b00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1159b7b4b00000

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 1152 at kernel/workqueue.c:3074 __flush_work+0x93f/0xb20 kernel/workqueue.c:3074
Modules linked in:
CPU: 1 PID: 1152 Comm: acpid Not tainted 5.15.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__flush_work+0x93f/0xb20 kernel/workqueue.c:3074
Code: ff 41 89 c4 89 8d 88 fe ff ff e8 4c 9d 55 00 48 0f ba 2b 03 e9 55 fa ff ff e8 7d 62 26 00 0f 0b e9 4c fc ff ff e8 71 62 26 00 <0f> 0b 45 31 f6 e9 3d fc ff ff e8 a2 99 55 00 e9 25 fb ff ff e8 58
RSP: 0018:ffffc90000287b38 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88811b42e290 RCX: 0000000000000000
RDX: ffff888110543680 RSI: ffffffff811b65af RDI: 0000000000000003
RBP: ffffc90000287cd0 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff811b5d15 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff92000050f9d R14: 0000000000000001 R15: ffff88811b42e2a8
FS:  00007f81838cb740(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f894189201d CR3: 000000010d04e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3170
 atp_close+0x5e/0xa0 drivers/input/mouse/appletouch.c:812
 input_close_device+0x156/0x1f0 drivers/input/input.c:687
 evdev_close_device drivers/input/evdev.c:414 [inline]
 evdev_release+0x34c/0x410 drivers/input/evdev.c:456
 __fput+0x288/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x215/0x220 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f81839b3fc3
Code: 48 ff ff ff b8 ff ff ff ff e9 3e ff ff ff 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8
RSP: 002b:00007ffe5cb7c8f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00007ffe5cb7cb68 RCX: 00007f81839b3fc3
RDX: 0000000000000000 RSI: 000000000000001e RDI: 000000000000000a
RBP: 000000000000000a R08: 00007ffe5cb7cb7c R09: 00007ffe5cb7ca68
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe5cb7ca68
R13: 00007ffe5cb7cb68 R14: 0000000000000020 R15: 0000000000000000


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

* Re: [syzbot] WARNING in atp_close (3)
  2021-10-03  0:00 [syzbot] WARNING in atp_close (3) syzbot
  2021-10-23  0:38 ` syzbot
@ 2021-12-30 13:12 ` Pavel Skripkin
  2021-12-30 13:33   ` syzbot
  1 sibling, 1 reply; 4+ messages in thread
From: Pavel Skripkin @ 2021-12-30 13:12 UTC (permalink / raw)
  To: syzbot, dmitry.torokhov, linux-input, linux-kernel, syzkaller-bugs

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On 10/3/21 03:00, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    bf5b1e621a51 Add linux-next specific files for 20210927
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=11cc5bd3300000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=4b58fe22c337ee4a
> dashboard link: https://syzkaller.appspot.com/bug?extid=b88c5eae27386b252bbd
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+b88c5eae27386b252bbd@syzkaller.appspotmail.com
> 

dev->work should be initialized before input_register_device(), since 
input_dev->close() calls cancel_work_sync()

#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master




With regards,
Pavel Skripkin

[-- Attachment #2: ph --]
[-- Type: text/plain, Size: 714 bytes --]

diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index bfa26651c0be..627048bc6a12 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -916,6 +916,8 @@ static int atp_probe(struct usb_interface *iface,
 	set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
 	set_bit(BTN_LEFT, input_dev->keybit);
 
+	INIT_WORK(&dev->work, atp_reinit);
+
 	error = input_register_device(dev->input);
 	if (error)
 		goto err_free_buffer;
@@ -923,8 +925,6 @@ static int atp_probe(struct usb_interface *iface,
 	/* save our data pointer in this interface device */
 	usb_set_intfdata(iface, dev);
 
-	INIT_WORK(&dev->work, atp_reinit);
-
 	return 0;
 
  err_free_buffer:

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

* Re: [syzbot] WARNING in atp_close (3)
  2021-12-30 13:12 ` Pavel Skripkin
@ 2021-12-30 13:33   ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2021-12-30 13:33 UTC (permalink / raw)
  To: dmitry.torokhov, linux-input, linux-kernel, paskripkin, syzkaller-bugs

Hello,

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

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

Tested on:

commit:         eec4df26 Merge tag 's390-5.16-6' of git://git.kernel.o..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=123612d4aeafb54e
dashboard link: https://syzkaller.appspot.com/bug?extid=b88c5eae27386b252bbd
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=1217f2fbb00000

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:[~2021-12-30 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03  0:00 [syzbot] WARNING in atp_close (3) syzbot
2021-10-23  0:38 ` syzbot
2021-12-30 13:12 ` Pavel Skripkin
2021-12-30 13:33   ` 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).