mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 11:05:50 +00:00
Driver APIs might not implement all operations, making it possible for a user thread to get the kernel to execute a function at 0x00000000. Perform runtime checks in all the driver handlers, checking if they're capable of performing the requested operation. Fixes #6907. Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
21 lines
462 B
C
21 lines
462 B
C
/*
|
|
* Copyright (c) 2017 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <syscall_handler.h>
|
|
#include <aio_comparator.h>
|
|
|
|
_SYSCALL_HANDLER(aio_cmp_disable, dev, index)
|
|
{
|
|
_SYSCALL_DRIVER_AIO_CMP(dev, disable);
|
|
return _impl_aio_cmp_disable((struct device *)dev, index);
|
|
}
|
|
|
|
_SYSCALL_HANDLER(aio_cmp_get_pending_int, dev)
|
|
{
|
|
_SYSCALL_DRIVER_AIO_CMP(dev, get_pending_int);
|
|
return _impl_aio_get_pending_int((struct device *)dev, index);
|
|
}
|