]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
IB/mthca: Set cleaned CQEs back to HW ownership when cleaning CQ
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Mon, 14 May 2007 14:14:50 +0000 (17:14 +0300)
committerRoland Dreier <rolandd@cisco.com>
Mon, 14 May 2007 21:10:34 +0000 (14:10 -0700)
commitbd18c112774db5bb887adb981ffbe9bfe00b2f3a
treeb879940658532e3962e98ce5624f7d86661e122a
parent3e28c56b9b67347b42ba06f9a9373b408902beee
IB/mthca: Set cleaned CQEs back to HW ownership when cleaning CQ

mthca_cq_clean() updates the CQ consumer index without moving CQEs
back to HW ownership.  As a result, the same WRID might get reported
twice, resulting in a use-after-free.  This was observed in IPoIB CM.
Fix by moving all freed CQEs to HW ownership.

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

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_cq.c