summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-04-16 21:01:13 -0700
committerRoland Dreier <rolandd@cisco.com>2008-04-16 21:01:13 -0700
commit19773539d6369c54fbb0c870de0c75417b0020d1 (patch)
treecf1f05517a3aa68fd13f2e2a18389316d0420379 /ipc
parentf4f82994d1ea0cd01058a245985f1eb5e569e6d3 (diff)
downloadkernel-crypto-19773539d6369c54fbb0c870de0c75417b0020d1.tar.gz
kernel-crypto-19773539d6369c54fbb0c870de0c75417b0020d1.tar.xz
kernel-crypto-19773539d6369c54fbb0c870de0c75417b0020d1.zip
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions