]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
IB/hfi1: Drop stale TID RDMA packets
authorKaike Wan <kaike.wan@intel.com>
Thu, 15 Aug 2019 19:20:33 +0000 (15:20 -0400)
committerDoug Ledford <dledford@redhat.com>
Tue, 20 Aug 2019 17:44:44 +0000 (13:44 -0400)
commitd58c1834bf0d218a0bc00f8fb44874551b21da84
tree64105737feaaf25d66c11f74a57788015a1cce5b
parent9b440078017f194e56eaae3ac32f333f420c5c4e
IB/hfi1: Drop stale TID RDMA packets

In a congested fabric with adaptive routing enabled, traces show that
the sender could receive stale TID RDMA NAK packets that contain newer
KDETH PSNs and older Verbs PSNs. If not dropped, these packets could
cause the incorrect rewinding of the software flows and the incorrect
completion of TID RDMA WRITE requests, and eventually leading to memory
corruption and kernel crash.

The current code drops stale TID RDMA ACK/NAK packets solely based
on KDETH PSNs, which may lead to erroneous processing. This patch
fixes the issue by also checking the Verbs PSN. Addition checks are
added before rewinding the TID RDMA WRITE DATA packets.

Fixes: 9e93e967f7b4 ("IB/hfi1: Add a function to receive TID RDMA ACK packet")
Cc: <stable@vger.kernel.org>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Link: https://lore.kernel.org/r/20190815192033.105923.44192.stgit@awfm-01.aw.intel.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/tid_rdma.c