projects
/
platform
/
kernel
/
swap-modules.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35fb7ac
)
[FIX] error handling for copy from user
author
Anatolii Nikulin
<nikulin.a@samsung.com>
Tue, 29 Sep 2015 13:23:05 +0000
(16:23 +0300)
committer
Dmitry Kovalenko
<d.kovalenko@samsung.com>
Tue, 29 Sep 2015 13:35:09 +0000
(06:35 -0700)
swap_msg_flush() should not call if strncpy_from_user() return error
Change-Id: I778abaca7078b4594a3bc1364ed3ef181c174648
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
ks_features/ksf_msg.c
patch
|
blob
|
history
diff --git
a/ks_features/ksf_msg.c
b/ks_features/ksf_msg.c
index
94d2151
..
b465359
100644
(file)
--- a/
ks_features/ksf_msg.c
+++ b/
ks_features/ksf_msg.c
@@
-240,7
+240,7
@@
void ksf_msg_file_entry_open(int fd, enum file_api_t api, const char *path,
n = strncpy_from_user(p, ofile, size);
if (n < 0) {
printk(KSF_PREFIX "cannot copy ofile\n");
-
swap_msg_put(m)
;
+
goto put_msg
;
}
swap_msg_flush(m, ret + n + 1);