linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: syzbot <syzbot+b88c5eae27386b252bbd@syzkaller.appspotmail.com>,
	dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] WARNING in atp_close (3)
Date: Thu, 30 Dec 2021 16:12:58 +0300	[thread overview]
Message-ID: <cb0cbd54-2b26-1c10-eb30-3b97870904d9@gmail.com> (raw)
In-Reply-To: <000000000000be49b905cd677b9a@google.com>

[-- 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:

  parent reply	other threads:[~2021-12-30 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-12-30 13:33   ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb0cbd54-2b26-1c10-eb30-3b97870904d9@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+b88c5eae27386b252bbd@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).