Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
xenomai4
linux-evl
Commits
3b4ab815
Commit
3b4ab815
authored
Jun 16, 2019
by
Philippe Gerum
Browse files
evl/poll: return -EBADF on bad fd specification
Signed-off-by:
Philippe Gerum
<
rpm@xenomai.org
>
parent
bf89878e
Changes
1
Hide whitespace changes
Inline
Side-by-side
kernel/evl/poll.c
View file @
3b4ab815
...
...
@@ -206,7 +206,7 @@ static int add_item(struct file *filp, struct poll_group *group,
efilp
=
evl_get_file
(
creq
->
fd
);
if
(
efilp
==
NULL
)
{
ret
=
-
E
INVAL
;
ret
=
-
E
BADF
;
goto
fail_get
;
}
...
...
@@ -269,7 +269,7 @@ static int del_item(struct poll_group *group,
item
=
lookup_item
(
&
group
->
item_index
,
creq
->
fd
);
if
(
item
==
NULL
)
{
evl_unlock_kmutex
(
&
group
->
item_lock
);
return
-
E
NOENT
;
return
-
E
BADF
;
}
rb_erase
(
&
item
->
rb
,
&
group
->
item_index
);
...
...
@@ -322,7 +322,7 @@ int mod_item(struct poll_group *group,
item
=
lookup_item
(
&
group
->
item_index
,
creq
->
fd
);
if
(
item
==
NULL
)
{
evl_unlock_kmutex
(
&
group
->
item_lock
);
return
-
E
NOENT
;
return
-
E
BADF
;
}
item
->
events_polled
=
events
;
...
...
Write
Preview
Supports
Markdown
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