Use secure alloc in _raw_dynamic_get_item

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2019-04-18 23:10:45 -04:00
parent d3bfbf6200
commit c7df9161be

View File

@ -93,8 +93,9 @@ static void *_raw_dynamic_get_item(ocf_cache_t cache,
OCF_DEBUG_PARAM(cache, "New page allocation - %u", page); OCF_DEBUG_PARAM(cache, "New page allocation - %u", page);
new = env_zalloc(PAGE_SIZE, ENV_MEM_NORMAL); new = env_secure_alloc(PAGE_SIZE);
if (new) { if (new) {
ENV_BUG_ON(env_memset(new, PAGE_SIZE, 0));
ctrl->pages[page] = new; ctrl->pages[page] = new;
env_atomic_inc(&ctrl->count); env_atomic_inc(&ctrl->count);
} }