Commit 696ed92
committed
providers/efa: Fix the size check in efadv_create_cq
efadv_create_cq incorrectly uses sizeof(efa_attr) instead
of sizeof(*efa_attr) to calculate the size of the efa_attr struct,
as a result, the currentt inlen>sizeof(efa_attr) will always be
true as the latter will be 8 bytes always.
This bug breaks the backward compatibility when a library is built
with an older rdma-core that has smaller efa_attr struct, but
run with newer rdma-core that has larger efa_attr, as the later called
`is_ext_clear` check is to make sure when application
input a inlen larger than size of efa_attr,
the extra space are all zero-ed, and it will fail when the inlen
is smaller than the actual size of efa_attr.
However when inlen is <= than size of the efa_attr struct,
such is_ext_clear check shouldn't happen.
Fixes: a00b600 ("efa: Introduce EFA DV CQ")
Signed-off-by: Shi Jin <sjina@amazon.com>1 parent 0d977c5 commit 696ed92
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | | - | |
| 1288 | + | |
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
| |||
0 commit comments