Merge changes I3b0c6325,I40f97f4b

* changes:
  Fix a race condition in remote access HAL.
  Define a new remoteaccess HAL for test.