Opened 15 years ago
Closed 15 years ago
#233 closed defect (fixed)
kbox_proc_phone_hungup() holds spinlocks while taking a mutex
Reported by: | Jakub Jermář | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.4.3 |
Component: | helenos/kernel/generic | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
In kbox_proc_phone_hungup() we have the following locking sequence:
spinlock_lock(&TASK→lock);
spinlock_lock(&TASK→kb.box.lock);
mutex_lock(&TASK→kb.cleanup_lock);
Note that holding a spinlock while taking a mutex is considered harmful.
Change History (2)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in changeset:head,436. Simply swapped the locking order in kbox_proc_phone_hungup(), which was reversed. I am wondering if it would be possible to synchronize the kbox in a more simple/natural way, the current scheme looks a little convoluted.
Note:
See TracTickets
for help on using tickets.
This bug is now caught by a check added in changeset:head,434.