kernel: Add missing verification for device_usable_check() system call
so that this function and also device_is_ready() can be called from user mode. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
890eff6c0c
commit
6de16d0013
1 changed files with 8 additions and 0 deletions
|
@ -149,6 +149,14 @@ static inline const struct device *z_vrfy_device_get_binding(const char *name)
|
||||||
return z_impl_device_get_binding(name_copy);
|
return z_impl_device_get_binding(name_copy);
|
||||||
}
|
}
|
||||||
#include <syscalls/device_get_binding_mrsh.c>
|
#include <syscalls/device_get_binding_mrsh.c>
|
||||||
|
|
||||||
|
static inline int z_vrfy_device_usable_check(const struct device *dev)
|
||||||
|
{
|
||||||
|
Z_OOPS(Z_SYSCALL_OBJ_INIT(dev, K_OBJ_ANY));
|
||||||
|
|
||||||
|
return z_impl_device_usable_check(dev);
|
||||||
|
}
|
||||||
|
#include <syscalls/device_usable_check_mrsh.c>
|
||||||
#endif /* CONFIG_USERSPACE */
|
#endif /* CONFIG_USERSPACE */
|
||||||
|
|
||||||
size_t z_device_get_all_static(struct device const **devices)
|
size_t z_device_get_all_static(struct device const **devices)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue