Skip to content
Commit 841adfca authored by Ralph Campbell's avatar Ralph Campbell Committed by Roland Dreier
Browse files

IPoIB/cm: Partial error clean up unmaps wrong address



If a page can't be allocated for the frag list of a skb, the code to
unmap the partially allocated list is off by one.  For exaple, if
'frags' equals one, i == 0, and the alloc_page() fails, then the old
loop would have unmapped mapping[1] which is uninitialized.  The same
would happen if the call to ib_dma_map_page() failed.

Signed-off-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
Acked-by: default avatarMichael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 786f238e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment