]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB: Allocate priv->tx_ring with vmalloc()
authorRoland Dreier <rolandd@cisco.com>
Wed, 12 Mar 2008 14:51:03 +0000 (07:51 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 12 Mar 2008 14:51:03 +0000 (07:51 -0700)
commitbc309584e3da8e3cce3d3928411956d3ed5c95d0
tree6e10b1066fcb3f3a699960c62535f0cbea240738
parent2d5d3b8dbfab1761c686e8d067a3fa9827e8601e
IPoIB: Allocate priv->tx_ring with vmalloc()

Commit 54196d6c ("IPoIB: Add send gather support") made struct
ipoib_tx_buf significantly larger, since the mapping member changed
from a single u64 to an array with MAX_SKB_FRAGS + 1 entries.  This
means that allocating tx_rings with kzalloc() may fail because there
is not enough contiguous memory for the new, much bigger size.  Fix
this regression by allocating the rings with vmalloc() instead.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_main.c