[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-devel] Race condition in queue.c::queue_run_what_we_can()
From: |
Calin A. Culianu |
Subject: |
[Pan-devel] Race condition in queue.c::queue_run_what_we_can() |
Date: |
Sun, 30 May 2004 09:59:30 -0500 (EST) |
I noticed a possible race condition in queue.c::run_what_we_can().
It appears that the task_list is missing a mutex lock/unlock in this
function. This data structure is shared across multiple threads
(specifically, the UI thread and the queue/task thread).
Other threads that access task_list do lock and unlock the task_lock when
they are reading/writing to the task_list, but the queue thread doesn't do
this. This could possibly cause stability issues since.. well.. race
conditions are always bad in threaded code.
Is there a reason for omitting this mutex lock/unlock?
If it turns out locking isn't a bad idea (which I would argue it isn't),
how do I go about submitting this sourcecode change to the cvs tree?
Should I just send a patch to this mailing list? Does anyone want to
review this change? I think it's a worthwhile stability fix..
-Calin
- [Pan-devel] Race condition in queue.c::queue_run_what_we_can(),
Calin A. Culianu <=