Code: int sock_recv_all(int sock_fd, uint8_t* buf, int len)
{
 int r = len;

     int ret = -1;
     while(r)
     {
        do ret = recv(sock_fd, buf, r, MSG_WAITALL);
         while(ret < 0 && errno == EINTR);
         if(ret <= 0)
         {
            BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret);
 return -1;
 }
        buf += ret;
        r -= ret;
 }
 return len;
}

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

CWE ID: CWE-284
int sock_recv_all(int sock_fd, uint8_t* buf, int len)
{
 int r = len;

     int ret = -1;
     while(r)
     {
        do ret = TEMP_FAILURE_RETRY(recv(sock_fd, buf, r, MSG_WAITALL));
         while(ret < 0 && errno == EINTR);
         if(ret <= 0)
         {
            BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret);
 return -1;
 }
        buf += ret;
        r -= ret;
 }
 return len;
}
