Page MenuHomeFreeBSD

recursive mutex in pci_xhci leads to deadlock
Needs ReviewPublic

Authored by on May 4 2018, 4:17 AM.


Group Reviewers

In SmartOS, it was discovered that use of an xhci tablet leads a deadlock
because pci_xhci_handle_transfer() has already taken the lock that its
callee pci_xhci_try_usb_xfer() tries to take.

Test Plan

Verify that a VM configured with fbuf and an xhci tablet no longer lead
to the deadlock.

Diff Detail

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 16421
Build 16342: arc lint + arc unit

Event Timeline

grehan added a subscriber: grehan.May 4 2018, 4:46 AM

I checked with Leon and he thought this was fine. Will submit pending the copyright issue.


In general the FreeBSD project doesn't like having copyright added unless > 25% of the file has been modified. Is it Ok if I remove this ?


Per Joyent management:

It's our policy that any change that isn't de minimus must bear a Joyent copyright.

rgrimes added inline comments.May 4 2018, 2:04 PM

Moving 2 lines of code to inside an if statement is pretty "minimus"?


Not including a copyright statement in this change would require an exception to our policy, which may involve an unbounded amount of time and potential legal review. Is it worth holding up this change for that?

It is unlikely that most of the individual changes that Joyent will contribute will change 25% of most files that are touched. This does not negate the fact that we are contributing significant engineering resources into diagnosing, fixing, and testing our fixes. We want to be in sync with FreeBSD, but a contribution policy that runs counter to our own policies will make that very difficult.

Is the policy related to attribution via copyright documented somewhere?

jhb added a subscriber: jhb.May 4 2018, 4:36 PM
jhb added inline comments.

Asserting copyright for this small of a change is highly unusual in the current practice of the project. We don't currently have a formally documented policy. I believe the 25% rule is a kind of common de facto practice in the industry however. Writing up a formal policy will require legal review on our end so it won't happen anytime soon. There are lots of companies (and individual developers) who contribute changes larger than this on a regular basis without asserting copyrights.