Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164711927
D27498.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
925 B
Referenced Files
None
Subscribers
None
D27498.diff
View Options
Index: head/sys/kern/kern_cpuset.c
===================================================================
--- head/sys/kern/kern_cpuset.c
+++ head/sys/kern/kern_cpuset.c
@@ -207,9 +207,13 @@
{
cpusetid_t id;
- if (refcount_release(&set->cs_ref) == 0)
+ if (refcount_release_if_not_last(&set->cs_ref))
return;
mtx_lock_spin(&cpuset_lock);
+ if (!refcount_release(&set->cs_ref)) {
+ mtx_unlock_spin(&cpuset_lock);
+ return;
+ }
LIST_REMOVE(set, cs_siblings);
id = set->cs_id;
if (id != CPUSET_INVALID)
@@ -229,9 +233,13 @@
cpuset_rel_defer(struct setlist *head, struct cpuset *set)
{
- if (refcount_release(&set->cs_ref) == 0)
+ if (refcount_release_if_not_last(&set->cs_ref))
return;
mtx_lock_spin(&cpuset_lock);
+ if (!refcount_release(&set->cs_ref)) {
+ mtx_unlock_spin(&cpuset_lock);
+ return;
+ }
LIST_REMOVE(set, cs_siblings);
if (set->cs_id != CPUSET_INVALID)
LIST_REMOVE(set, cs_link);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 4, 7:34 AM (4 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35905995
Default Alt Text
D27498.diff (925 B)
Attached To
Mode
D27498: kern: cpuset: resolve race between cpuset_lookup/cpuset_rel
Attached
Detach File
Event Timeline
Log In to Comment