[asterisk-dev] Bug/patch 9596

Dan Austin Dan_Austin at Phoenix.com
Fri Jun 1 15:21:56 MST 2007


Michiel wrote:
> On 13:30, Fri 01 Jun 07, Dan Austin wrote:
>> I'm glad to see the patch merged, but I had one
>> outstanding question about my approach.
>> 
>> The patch as merged has no locking on the device
>> structure.  With two thread accessing the buffer
>> holding the pre-dial digits, one reading and one
>> writing, should there be some locking in place?

> Should be easy to test I think.
> I have 2 phones so I'll ask my wife to start dialing a
> number while I'm dialing another number tomorrow.
> I'll report back to you as soon as I know.

That won't cause any problems.  The variable in question
is in the device structure, so it is unique per device.
The issue is that it is possible that skinny_ss wakes up
and tries to read the variable at the same time the user
enters a new digit.  The window is small, but possible.
I am not sure what the failure mode would be.

I am familiar with the reasons and concepts for locking,
but not with the implementation.  

Dan


More information about the asterisk-dev mailing list