Re: [PATCH] Audio: fix race condition when starting a stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter,

On Thu, Jul 07, 2011, Peter Hurley wrote:
> The AVDTP spec allows for a race condition between remote and local
> device when issuing an AVDTP_START cmd on a stream in the OPEN state.
> 
> However, the internal state must continue to be consistent. For example,
> suppose that avdtp_start() has been called while in the OPEN state and
> a AVDTP_START cmd is sent.  Now before we have received a response (and
> thus entered the STREAMING state), we *receive* a START cmd. Prior to
> this fix, since the sep is still in the OPEN state, we would accept
> the new START cmd. This will leads us to send both a Start_Ind and
> Start_Cfm - not good.
> 
> Now, we track this transitional state (starting == TRUE).
> 
> NB - 'starting' is only in a valid state while the sep is in the
> OPEN state. 'starting' is reset when we return to the OPEN state.
> ---
>  audio/avdtp.c |   29 +++++++++++++++++++++++++----
>  1 files changed, 25 insertions(+), 4 deletions(-)

Applied. Thanks.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux