Code: static BOOLEAN flush_incoming_que_on_wr_signal_l(l2cap_socket *sock)
{
 uint8_t *buf;

     uint32_t len;
 
     while (packet_get_head_l(sock, &buf, &len)) {
        int sent = send(sock->our_fd, buf, len, MSG_DONTWAIT);
 
         if (sent == (signed)len)
             osi_free(buf);
 else if (sent >= 0) {
            packet_put_head_l(sock, buf + sent, len - sent);
            osi_free(buf);
 if (!sent) /* special case if other end not keeping up */
 return TRUE;
 }
 else {
            packet_put_head_l(sock, buf, len);
            osi_free(buf);
 return errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN;
 }
 }

 return FALSE;
}

Vulnerability Type: DoS 
CWE ID: CWE-284
Summary: Bluetooth in Android 4.x before 4.4.4, 5.0.x before 5.0.2, 5.1.x before 5.1.1, and 6.x before 2016-08-01 allows attackers to cause a denial of service (loss of Bluetooth 911 functionality) via a crafted application that sends a signal to a Bluetooth process, aka internal bug 28885210.
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360

 Conflicts:
	btif/co/bta_hh_co.c
	btif/src/btif_core.c
Merge conflict resolution of ag/1161415 (referencing ag/1164670)
- Directly into mnc-mr2-release
