OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cedd6dd
)
soc: qcom: hab: check the buffer's pointer before exporting it
author
Yong Ding
<yongding@codeaurora.org>
Wed, 4 Jul 2018 07:05:37 +0000
(15:05 +0800)
committer
Yong Ding
<yongding@codeaurora.org>
Wed, 4 Jul 2018 07:08:24 +0000
(15:08 +0800)
When the buffer's pointer is NULL, -EINVAL will be returned for
its export.
Change-Id: I3fc949c6152974db360dc55d3dfdb0cb24150473
Signed-off-by: Yong Ding <yongding@codeaurora.org>
drivers/soc/qcom/hab/hab_mimex.c
patch
|
blob
|
history
diff --git
a/drivers/soc/qcom/hab/hab_mimex.c
b/drivers/soc/qcom/hab/hab_mimex.c
index
86d763f
..
dddf51a
100644
(file)
--- a/
drivers/soc/qcom/hab/hab_mimex.c
+++ b/
drivers/soc/qcom/hab/hab_mimex.c
@@
-240,7
+240,7
@@
int hab_mem_export(struct uhab_context *ctx,
int page_count;
int compressed = 0;
- if (!ctx || !param)
+ if (!ctx || !param
|| !param->buffer
)
return -EINVAL;
vchan = hab_get_vchan_fromvcid(param->vcid, ctx);