]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
IB/mlx4: Fix MTT leakage in resize CQ
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Mon, 1 Dec 2008 18:09:37 +0000 (10:09 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 1 Dec 2008 18:09:37 +0000 (10:09 -0800)
commit42ab01c31526ac1d06d193f81a498bf3cf2acfe4
tree8d6805257ebfb52841a58892e774393563453c50
parent9a5aa622dd4cd22b5e0fe83e4a9c0c768d4e2dea
IB/mlx4: Fix MTT leakage in resize CQ

When resizing a CQ, MTTs associated with the old CQE buffer were not
freed.  As a result, if any app used resize CQ repeatedly, all MTTs
were eventually exhausted, which led to all memory registration
operations failing until the driver is reloaded.

Once the RESIZE_CQ command returns successfully from FW, FW no longer
accesses the old CQ buffer, so it is safe to deallocate the MTT
entries used by the old CQ buffer.

Finally, if the RESIZE_CQ command fails, the MTTs allocated for the
new CQEs buffer also need to be de-allocated.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1416>.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/cq.c