[ 
https://issues.apache.org/jira/browse/MYNEWT-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949843#comment-15949843
 ] 

ASF subversion and git services commented on MYNEWT-700:
--------------------------------------------------------

Commit 9b6c2847d4fef37e2cbe47b5dfc4b85555c8e3a7 in incubator-mynewt-core's 
branch refs/heads/nrf_cputime from [~ccollins476]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=9b6c284 
]

MYNEWT-700 BLE Host - Race condition: discon + att

Some parts of the ATT code assume a peer is still connected after an
initial check. This assumption leads to a race condition when a task
other than the host task is doing the transmitting (e.g., tx of
unsolicited notification). It is possible that the peer gets
disconnected after the tx function is called, but before it completes.
When this occurs, an assertion fails (ble_att_conn_chan_find()).

The fix is to remove this assumption. Always check that the connection /
channel lookup succeeds before accessing the returned pointers.


> BLE Host - Race condition: disconnect + att-tx
> ----------------------------------------------
>
>                 Key: MYNEWT-700
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-700
>             Project: Mynewt
>          Issue Type: Bug
>            Reporter: Christopher Collins
>            Assignee: Christopher Collins
>             Fix For: v1_1_0_rel
>
>
> Some parts of the ATT code assume a peer is still connected after an initial 
> check.  This assumption leads to a race condition when a task other than the 
> host task is doing the transmitting (e.g., tx of unsolicited notification).  
> It is possible that the peer gets disconnected after the tx function is 
> called, but before it completes.  When this occurs, an assertion fails 
> (ble_att_conn_chan_find()).
> The fix is to remove this assumption.  Always check that the connection / 
> channel lookup succeeds before accessing the returned pointers.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to