Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some incorrect syscall handlers #23308

Merged
merged 2 commits into from Mar 7, 2020

Conversation

andrewboie
Copy link
Contributor

GPIO and kscan had problems in their syscall handlers where driver objects were not being validated.

No check of the driver object was being performed for two
APIs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
@andrewboie andrewboie added Hotfix Fix for an issue blocking development Trivial At least 4 hours in review before merge labels Mar 6, 2020
@nashif nashif added this to the v2.2.0 milestone Mar 6, 2020
return z_impl_gpio_disable_callback((struct device *)port, pin);
}
#include <syscalls/gpio_disable_callback_mrsh.c>

static inline int z_vrfy_gpio_get_pending_int(struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, get_pending_int));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/port/dev/

@jhedberg jhedberg added the bug The issue is a bug, or the PR is fixing a bug label Mar 6, 2020
No driver object checks were being performed for 3 APIs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
@jhedberg jhedberg merged commit d6d42be into zephyrproject-rtos:master Mar 7, 2020
@andrewboie andrewboie deleted the syscall-fixes branch September 24, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Hotfix Fix for an issue blocking development Trivial At least 4 hours in review before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants