Bluetooth: Acquiring mutex while start of pool size check
Initially size needed is checked while traversing buffer pool
pool that can hold asked size, pool id is allocated after
that mutex is aquired and then again size is checked. Leading
toincrement in pool id and also corner cases can happen when
pool id identified in initial check could change.
Changes done to acquire mutex in initial stage as well
as change done to handle multiple error condition.
CRs-Fixed: 752447
Change-Id: Ida5d0a01f7f8882c6f312ce0a423c1d6cb75b17c
2 files changed