diff options
author | Jack Morgenstein <[email protected]> | 2016-11-27 15:18:19 +0200 |
---|---|---|
committer | Doug Ledford <[email protected]> | 2016-12-13 13:39:46 -0500 |
commit | c482af646d0809a8d5e1b7f4398cce3592589b98 (patch) | |
tree | 66e0776299a50052531a7d99a0a42b8d9f484daf /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 41c450fd8da549c5f7cced6650354095b0d4312a (diff) |
IB/mlx4: Fix out-of-range array index in destroy qp flow
For non-special QPs, the port value becomes non-zero only at the
RESET-to-INIT transition. If the QP has not undergone that transition,
its port number value is still zero.
If such a QP is destroyed before being moved out of the RESET state,
subtracting one from the qp port number results in a negative value.
Using that negative value as an index into the qp1_proxy array
results in an out-of-bounds array reference.
Fix this by testing that the QP type is one that uses qp1_proxy before
using the port number. For special QPs of all types, the port number is
specified at QP creation time.
Fixes: 9433c188915c ("IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes")
Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions