linux/drivers/infiniband/hw
Roland Dreier 24797a3442 RDMA/nes: Fix off-by-one in nes_reg_user_mr() error path
nes_reg_user_mr() should fail if page_count becomes >= 1024 * 512
rather than just testing for strict >, because page_count is
essentially used as an index into an array with 1024 * 512 entries, so
allowing the loop to continue with page_count == 1024 * 512 means that
memory after the end of the array is corrupted.  This leads to a crash
triggerable by a userspace application that requests registration of a
too-big region.

Also get rid of the call to pci_free_consistent() here to avoid
corrupting state with a double free, since the same memory will be
freed in the code jumped to at reg_user_mr_err.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-06-10 12:29:49 -07:00
..
amso1100 IB/core: Remove IB_DEVICE_SEND_W_INV capability flag 2008-06-09 09:58:42 -07:00
cxgb3 RDMA/cxgb3: Fix uninitialized variable warning in iwch_post_send() 2008-05-16 14:58:40 -07:00
ehca IB/ehca: Reject send WRs only for RESET, INIT and RTR state 2008-06-06 11:21:33 -07:00
ipath IB/ipath: Fix SM trap forwarding 2008-06-06 11:23:29 -07:00
mlx4 IB/mlx4: Fix creation of kernel QP with max number of send s/g entries 2008-05-20 14:00:02 -07:00
mthca IB/mthca: Fix max_sge value returned by query_device 2008-05-16 14:58:44 -07:00
nes RDMA/nes: Fix off-by-one in nes_reg_user_mr() error path 2008-06-10 12:29:49 -07:00