From: Manuel Reimer <mail+linux-input@m-reimer.de>
To: Cameron Gutman <aicommander@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>,
jikos@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v3] hid-sony: Prevent crash when rumble effects are still loaded at USB disconnect
Date: Sun, 12 Jun 2016 12:01:31 +0200 [thread overview]
Message-ID: <22b65c72-671a-51fc-db87-bdf9a927cf7f@m-reimer.de> (raw)
In-Reply-To: <575C6345.6040203@gmail.com>
On 06/11/2016 09:15 PM, Cameron Gutman wrote:
> Sorry, I misremembered what I thought I read in your email - you said you didn't see a call to ml_ff_destroy()
> in the disconnect case.
I also don't see this call with the xpad driver!
> Though that is quite strange to me, as the comments on ff_device indicate that it should be the right spot:
>
> 483 * @destroy: called by input core when parent input device is being
> 484 * destroyed
What does "input device is being destroyed" actually mean in this case?
I tried with the xpad driver and as long as fftest is running (it will
keep running until it detects that the device has been disconnected)
there is no ml_ff_destroy event. So, if I want, there can be hours
between actual USB disconnect and ml_ff_destroy.
So what does it mean to the kernel that fftest is keeping an open file
handle to this input device? Is it really gone if there is at least one
process still holding a reference to it?
And. It actually seems possible to trigger the bug with the xpad driver.
I didn't have the crash, but there is a good chance to get it. This is
what I managed to get:
[ 267.006873] ml_effect_timer start
[ 267.256399] ml_effect_timer end
[ 268.286814] xpad 1-2:1.0: xpad_try_sending_next_out_packet -
usb_submit_urb failed with result -19
[ 268.331112] xpad 1-2:1.0: xpad_try_sending_next_out_packet -
usb_submit_urb failed with result -19
[ 268.384689] xpad 1-2:1.0: xpad_try_sending_next_out_packet -
usb_submit_urb failed with result -19
[ 268.452146] xpad 1-2:1.0: xpad_try_sending_next_out_packet -
usb_submit_urb failed with result -19
[ 273.813537] ml_effect_timer start
[ 273.816845] usb ȵ�<: xpad_try_sending_next_out_packet -
usb_submit_urb failed with result -19
[ 274.400668] ml_effect_timer end
Starting with 268.286814 the USB device is gone! That's why the xpad
driver is throwing errors.
Some time later at 273.813537 (USB device is gone!) there is a new call
to the timer callback. "Unfortunately" no crash.
> I want to be sure we're on the right track though. Can you please resolve the address in the RIP register to a
> line number in hid-sony.c?
Can you point me to some instructions on how to do this? The only way to
debug things, I currently know, is the "good old print(f/k)" debugging...
Manuel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-12 10:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-29 12:11 [PATCH] hid-sony: Prevent crash when rumble effects are still loaded at USB disconnect Manuel Reimer
2016-05-29 17:11 ` Cameron Gutman
2016-05-30 4:45 ` mail
2016-05-30 19:15 ` Manuel Reimer
2016-06-02 17:53 ` [PATCH v2] " Manuel Reimer
2016-06-05 12:59 ` [PATCH v3] " Manuel Reimer
2016-06-07 5:38 ` Cameron Gutman
2016-06-07 15:55 ` Manuel Reimer
2016-06-11 10:00 ` Manuel Reimer
2016-06-11 17:37 ` Cameron Gutman
2016-06-11 19:15 ` Cameron Gutman
2016-06-12 10:01 ` Manuel Reimer [this message]
[not found] ` <20160612155643.d2218913a4f9ff42dec938e3@ao2.it>
2016-06-14 18:31 ` Manuel Reimer
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=22b65c72-671a-51fc-db87-bdf9a927cf7f@m-reimer.de \
--to=mail+linux-input@m-reimer.de \
--cc=aicommander@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/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).