Page MenuHomeFreeBSD

kern: cpuset: drop the lock to allocate domainsets
ClosedPublic

Authored by kevans on Nov 25 2020, 5:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 9:22 AM
Unknown Object (File)
Dec 12 2023, 2:33 AM
Unknown Object (File)
Sep 1 2023, 9:23 PM
Unknown Object (File)
Sep 1 2023, 9:18 PM
Unknown Object (File)
Sep 1 2023, 9:17 PM
Unknown Object (File)
Sep 1 2023, 8:52 PM
Unknown Object (File)
Jul 7 2023, 11:34 PM
Unknown Object (File)
Jul 6 2023, 8:06 PM
Subscribers

Details

Summary

Restructure the loop a little bit to make it a little more clear how it really operates: we never allocate any domains at the beginning of the first iteration, and it will run until we've satisfied the amount we need or we encounter an error.

The lock is now taken outside of the loop to make stuff inside the loop easier to evaluate w.r.t. locking.

This fixes it to not try and allocate any domains for the freelist under the spinlock, which would have happened before if we needed any new domains.

Reported-by: syzbot+6743fa07b9b7528dc561@syzkaller.appspotmail.com

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Thanks. I tested this patch with syzkaller's repro for the bug, seems to be fixed.

Reported-by: syzbot+6743fa07b9b7528dc561@syzkaller.appspotmail.com

It'll still work if you write "Reported by:" as we normally do, i.e. without the dash.

This revision is now accepted and ready to land.Nov 25 2020, 6:13 PM
This revision was automatically updated to reflect the committed changes.