Fix potential data loss when writing to congested L2CAP CoC.
Observed this rare problem with busy sockets on Wear OS watches paried with iOS: 1. Multiple poll events are received on the same poll call. 2. While processing commands ts[h].poll_count is incremented without updating pfds. 3. process_data_sock reads stale pfds entries and processes POLLIN on a fd that didn't actually receive this event. 4. Data is read from fd but dropped because the channel is congested. The change copies the initial poll_count to avoid reading stale pfds entries. Verified Wear iOS comms stack does not miss packets when using L2CAP CoC after the change. Bug: 223974328 Tag: #stability Test: gd/cert/run Change-Id: I676aa9f2f1074e5df89bbbf08f986c5fe8972358
Loading
Please register or sign in to comment