projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f121b1
)
connection: only one KDBUS_ITEM_CANCEL_FD item is allowed
author
Djalal Harouni
<tixxdz@opendz.org>
Sun, 21 Dec 2014 19:14:37 +0000
(20:14 +0100)
committer
Djalal Harouni
<tixxdz@opendz.org>
Sun, 21 Dec 2014 19:14:37 +0000
(20:14 +0100)
Make sure that only one KDBUS_ITEM_CANCEL_FD item is passed.
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
connection.c
patch
|
blob
|
history
diff --git
a/connection.c
b/connection.c
index 7045d92a3b372465f35c51e554b7710b36e0c83a..a0f749a7e10a5b6237bb4a9a94a895e8e89be607 100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-799,6
+799,11
@@
int kdbus_cmd_msg_send(struct kdbus_conn *conn_src,
break;
case KDBUS_ITEM_CANCEL_FD:
+ if (cancel_fd) {
+ ret = -EEXIST;
+ goto exit_put_cancelfd;
+ }
+
cancel_fd = fget(item->fds[0]);
if (IS_ERR(cancel_fd))
return PTR_ERR(cancel_fd);