]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB/cm: Partial error clean up unmaps wrong address
authorRalph Campbell <ralph.campbell@qlogic.com>
Fri, 29 Jun 2007 18:37:56 +0000 (11:37 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 3 Jul 2007 03:48:31 +0000 (20:48 -0700)
commitf5bfaf297c716d15d9da6e7b1f4764aaa2325904
treefcdc834ad623a890a0eeb499c41593615746c706
parentb15c9d0e5c7fd846ebe8d69ac22e5d25c91f03ec
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: Ralph Campbell <ralph.campbell@qlogic.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c