android_kernel_motorola_sm6225/drivers/infiniband/hw
Roland Dreier 19773539d6 IB/mthca: Avoid integer overflow when dealing with profile size
mthca_make_profile() returns the size in bytes of the HCA context
layout it creates, or a negative value if an error occurs.  However,
the return value is declared as u64 and the memfree initialization
path casts this value to int to test if it is negative.  This makes it
think incorrectly than an error has occurred if the context size
happens to be bigger than 2GB, since this turns into a negative int.

Fix this by having mthca_make_profile() return an s64 and testing
for an error by checking whether this 64-bit value itself is negative.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:01:13 -07:00
..
amso1100 IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00
cxgb3 IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00
ehca IB/ehca: Remove tgid checking 2008-04-16 21:01:13 -07:00
ipath IB/ipath: Enable 4KB MTU 2008-04-16 21:01:12 -07:00
mlx4 IB/mlx4: Add IPoIB checksum offload support 2008-04-16 21:01:10 -07:00
mthca IB/mthca: Avoid integer overflow when dealing with profile size 2008-04-16 21:01:13 -07:00
nes IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00