Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
c933bb7
)
svm: check svm_msg_q_size_to_alloc success
48/36548/1
author
Ofer Heifetz
<oferh@marvell.com>
Wed, 29 Jun 2022 17:18:27 +0000
(20:18 +0300)
committer
Ofer Heifetz
<oferh@marvell.com>
Wed, 29 Jun 2022 17:21:27 +0000
(20:21 +0300)
svm_msg_q_size_to_alloc must return a valid base address, if it fails
pass up the error for handling
Type: fix
Change-Id: I408492f65f646862122acb9a187819b3bbf4f91c
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
src/svm/fifo_segment.c
patch
|
blob
|
history
diff --git
a/src/svm/fifo_segment.c
b/src/svm/fifo_segment.c
index
489ca2a
..
c2ba6c0
100644
(file)
--- a/
src/svm/fifo_segment.c
+++ b/
src/svm/fifo_segment.c
@@
-1098,6
+1098,9
@@
fifo_segment_msg_q_alloc (fifo_segment_t *fs, u32 mq_index,
size = svm_msg_q_size_to_alloc (cfg);
base = fsh_alloc_aligned (fsh, size, 8);
+ if (!base)
+ return 0;
+
fsh->n_reserved_bytes += size;
smq = svm_msg_q_init (base, cfg);