I've been looking at this some more today. I'm about to leave on
vacation, so for now I'm describing what I've found and unassigning
myself in case someone else wants to pick it up while I'm out.
As far as I can tell right now, there seems to be a race between adding
and deleting bluetooth HID devices. There is no serialization. Removal
is done on the hidp_session task (via hidp_del_connection), and adding
is done on whatever thread calls hidp_add_connection. If the device is
being torn down when hidp_del_connection runs, hidp_setup_hid may find
find the device that's being torn down and assume that it's legitimate
to use. Later when setting up sysfs paths the oops happens because the
sysfs_dirent in that device's kobject has already been freed.
I'm not sure exactly why this race exists, i.e. why a connection for the
same device is getting crated and torn down at the same time. Some
comments I've seen indicate that a disconnection could be happening due
to the device being unresponsive for a period. It's not implausible to
think that the device is powered of or forcibly disconnected during
suspend, causing such a timeout in communication with the device, and
that this ends up overlapping device reconnection during resume.
I'm not entirely sure that the above analysis is correct, but it's the
best explanation I've come up with so far.
** Changed in: linux (Ubuntu)
Assignee: Seth Forshee (sforshee) => (unassigned)
** Summary changed:
- ubuntu 11.10 crashes when trying to wake up after suspend
+ NULL pointer dereference at 0000000000000039 (sysfs_create_dir+0x35) when
resuming after suspend
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/837379
Title:
NULL pointer dereference at 0000000000000039 (sysfs_create_dir+0x35)
when resuming after suspend
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/837379/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs