k_mem_slab: track as a kernel object
We aren't going to allow any user mode access to the k_mem_slab APIs, but in some cases (specifically in the case of the I2S subsystem) we need to allow user mode to assign a memory slab to a particular driver. This will let us verfiy (in supervisor mode) that a provided k_mem_slab pointer is really a k_mem_slab, and know its initialization state, and have permissions assigned to it. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
8da14d79fd
commit
f253d0779d
2 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,7 @@ static int init_mem_slab_module(struct device *dev)
|
|||
slab++) {
|
||||
create_free_list(slab);
|
||||
SYS_TRACING_OBJ_INIT(k_mem_slab, slab);
|
||||
_k_object_init(slab);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue