-
Notifications
You must be signed in to change notification settings - Fork 168
vma/dev: Fix new/delete size mismatch. #1149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,7 +56,7 @@ bool rfs_mc::prepare_flow_spec() | |||||||||||||||
| #ifdef DEFINED_IBV_FLOW_SPEC_IB | ||||||||||||||||
| attach_flow_data_ib_v1_t* attach_flow_data_ib_v1 = NULL; | ||||||||||||||||
|
|
||||||||||||||||
| attach_flow_data_ib_v1 = new attach_flow_data_ib_v1_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_ib_v1 = new_malloc<attach_flow_data_ib_v1_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
|
|
||||||||||||||||
| uint8_t dst_gid[16]; | ||||||||||||||||
|
Comment on lines
+59
to
61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| create_mgid_from_ipv4_mc_ip(dst_gid, p_ring->m_p_qp_mgr->get_partiton(), m_flow_tuple.get_dst_ip()); | ||||||||||||||||
|
|
@@ -70,7 +70,7 @@ bool rfs_mc::prepare_flow_spec() | |||||||||||||||
| #endif | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| attach_flow_data_ib_v2 = new attach_flow_data_ib_v2_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_ib_v2 = new_malloc<attach_flow_data_ib_v2_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
|
|
||||||||||||||||
| ibv_flow_spec_ipv4_set(&(attach_flow_data_ib_v2->ibv_flow_attr.ipv4), | ||||||||||||||||
|
Comment on lines
+73
to
75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| m_flow_tuple.get_dst_ip(), | ||||||||||||||||
|
|
@@ -88,7 +88,7 @@ bool rfs_mc::prepare_flow_spec() | |||||||||||||||
| { | ||||||||||||||||
| attach_flow_data_eth_ipv4_tcp_udp_t* attach_flow_data_eth = NULL; | ||||||||||||||||
|
|
||||||||||||||||
| attach_flow_data_eth = new attach_flow_data_eth_ipv4_tcp_udp_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_eth = new_malloc<attach_flow_data_eth_ipv4_tcp_udp_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
|
|
||||||||||||||||
| uint8_t dst_mac[6]; | ||||||||||||||||
|
Comment on lines
+91
to
93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| create_multicast_mac_from_ip(dst_mac, m_flow_tuple.get_dst_ip()); | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,7 +59,7 @@ bool rfs_uc::prepare_flow_spec() | |||||||||||||||
| if (0 == p_ring->m_p_qp_mgr->get_underly_qpn()) { | ||||||||||||||||
| attach_flow_data_ib_ipv4_tcp_udp_v1_t* attach_flow_data_ib_v1 = NULL; | ||||||||||||||||
|
|
||||||||||||||||
| attach_flow_data_ib_v1 = new attach_flow_data_ib_ipv4_tcp_udp_v1_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_ib_v1 = new_malloc<attach_flow_data_ib_ipv4_tcp_udp_v1_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
| ibv_flow_spec_ib_set_by_dst_qpn(&(attach_flow_data_ib_v1->ibv_flow_attr.ib), | ||||||||||||||||
|
Comment on lines
+62
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| htonl(((IPoIB_addr*)p_ring->m_p_l2_addr)->get_qpn())); | ||||||||||||||||
| p_ipv4 = &(attach_flow_data_ib_v1->ibv_flow_attr.ipv4); | ||||||||||||||||
|
|
@@ -68,7 +68,7 @@ bool rfs_uc::prepare_flow_spec() | |||||||||||||||
| break; | ||||||||||||||||
| } | ||||||||||||||||
| #endif | ||||||||||||||||
| attach_flow_data_ib_v2 = new attach_flow_data_ib_ipv4_tcp_udp_v2_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_ib_v2 = new_malloc<attach_flow_data_ib_ipv4_tcp_udp_v2_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
|
|
||||||||||||||||
| p_ipv4 = &(attach_flow_data_ib_v2->ibv_flow_attr.ipv4); | ||||||||||||||||
|
Comment on lines
+71
to
73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| p_tcp_udp = &(attach_flow_data_ib_v2->ibv_flow_attr.tcp_udp); | ||||||||||||||||
|
|
@@ -77,7 +77,7 @@ bool rfs_uc::prepare_flow_spec() | |||||||||||||||
| } | ||||||||||||||||
| case VMA_TRANSPORT_ETH: | ||||||||||||||||
| { | ||||||||||||||||
| attach_flow_data_eth = new attach_flow_data_eth_ipv4_tcp_udp_t(p_ring->m_p_qp_mgr); | ||||||||||||||||
| attach_flow_data_eth = new_malloc<attach_flow_data_eth_ipv4_tcp_udp_t>(p_ring->m_p_qp_mgr); | ||||||||||||||||
|
|
||||||||||||||||
| ibv_flow_spec_eth_set(&(attach_flow_data_eth->ibv_flow_attr.eth), | ||||||||||||||||
|
Comment on lines
+80
to
82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: missing null check after allocation - if
Suggested change
|
||||||||||||||||
| p_ring->m_p_l2_addr->get_address(), | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic:
aligned_allocreturns NULL on failure, but there's no null check before placement new