android_kernel_xiaomi_sdm845/drivers/infiniband/hw/mthca
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
..
Kconfig IB: Use menuconfig for InfiniBand menu 2007-07-09 20:12:26 -07:00
Makefile
mthca_allocator.c IB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>) 2007-07-10 12:28:05 -07:00
mthca_av.c IB/mthca: Set GRH:HopLimit when building MLX headers 2007-05-19 08:51:56 -07:00
mthca_catas.c
mthca_cmd.c IB/mthca: Add IPoIB checksum offload support 2008-04-16 21:01:11 -07:00
mthca_cmd.h IB/mthca: Add IPoIB checksum offload support 2008-04-16 21:01:11 -07:00
mthca_config_reg.h
mthca_cq.c IB/mthca: Add IPoIB checksum offload support 2008-04-16 21:01:11 -07:00
mthca_dev.h IB/mthca: Formatting cleanups 2008-04-16 21:01:03 -07:00
mthca_doorbell.h IB/mthca: Avoid alignment traps when writing doorbells 2007-10-15 20:17:27 -07:00
mthca_eq.c IB/mthca: Formatting cleanups 2008-04-16 21:01:03 -07:00
mthca_mad.c IB/mthca: Formatting cleanups 2008-04-16 21:01:03 -07:00
mthca_main.c IB/mthca: Avoid integer overflow when dealing with profile size 2008-04-16 21:01:13 -07:00
mthca_mcg.c
mthca_memfree.c IB/mthca: Formatting cleanups 2008-04-16 21:01:03 -07:00
mthca_memfree.h PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
mthca_mr.c IB/mthca: Free correct MPT on error exit from mthca_fmr_alloc() 2008-02-19 10:42:50 -08:00
mthca_pd.c
mthca_profile.c IB/mthca: Avoid integer overflow when dealing with profile size 2008-04-16 21:01:13 -07:00
mthca_profile.h IB/mthca: Avoid integer overflow when dealing with profile size 2008-04-16 21:01:13 -07:00
mthca_provider.c IB/mthca: Formatting cleanups 2008-04-16 21:01:03 -07:00
mthca_provider.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
mthca_qp.c IB/mthca: Add IPoIB checksum offload support 2008-04-16 21:01:11 -07:00
mthca_reset.c
mthca_srq.c IB/ib_mthca: Pre-link receive WQEs in Tavor mode 2008-02-04 20:20:44 -08:00
mthca_uar.c
mthca_user.h
mthca_wqe.h IB/mthca: Add IPoIB checksum offload support 2008-04-16 21:01:11 -07:00