Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
xenomai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xenomai
xenomai
Commits
50ef0051
Commit
50ef0051
authored
May 13, 2018
by
Philippe Gerum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/serial: imx: prevent call from invalid runtime mode
parent
3568a12e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
kernel/drivers/serial/rt_imx_uart.c
kernel/drivers/serial/rt_imx_uart.c
+9
-8
No files found.
kernel/drivers/serial/rt_imx_uart.c
View file @
50ef0051
...
...
@@ -963,6 +963,13 @@ static int rt_imx_uart_ioctl(struct rtdm_fd *fd,
struct
rtser_config
config_buf
;
uint64_t
*
hist_buf
=
NULL
;
/*
* We may call regular kernel services ahead, ask for
* re-entering secondary mode if need be.
*/
if
(
rtdm_in_rt_context
())
return
-
ENOSYS
;
config
=
(
struct
rtser_config
*
)
arg
;
if
(
rtdm_fd_is_user
(
fd
))
{
...
...
@@ -984,13 +991,6 @@ static int rt_imx_uart_ioctl(struct rtdm_fd *fd,
return
-
EINVAL
;
if
(
config
->
config_mask
&
RTSER_SET_TIMESTAMP_HISTORY
)
{
/*
* Reflect the call to non-RT as we will likely
* allocate or free the buffer.
*/
if
(
rtdm_in_rt_context
())
return
-
ENOSYS
;
if
(
config
->
timestamp_history
&
RTSER_RX_TIMESTAMP_HISTORY
)
hist_buf
=
kmalloc
(
IN_BUFFER_SIZE
*
...
...
@@ -1000,7 +1000,8 @@ static int rt_imx_uart_ioctl(struct rtdm_fd *fd,
rt_imx_uart_set_config
(
ctx
,
config
,
&
hist_buf
);
kfree
(
hist_buf
);
if
(
hist_buf
)
kfree
(
hist_buf
);
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment