drivers: uart: Add uart_configure verification handler

uart_configure verification handler was missing what would cause a crash
if called from a user thread.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2020-03-15 22:36:18 -07:00 committed by Anas Nashif
commit f0a4cb059d

View file

@ -51,6 +51,16 @@ static inline int z_vrfy_uart_config_get(struct device *dev,
}
#include <syscalls/uart_config_get_mrsh.c>
static inline int z_vrfy_uart_configure(struct device *dev,
const struct uart_config *cfg)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(Z_SYSCALL_MEMORY_READ(cfg, sizeof(struct uart_config)));
return z_impl_uart_configure(dev, cfg);
}
#include <syscalls/uart_configure_mrsh.c>
#ifdef CONFIG_UART_ASYNC_API
/* callback_set() excluded as we don't allow ISR callback installation from
* user mode