commit 4bcecc0547f5886bf0a3c8645817437d87d312e4
Author: Naveen N <email address hidden>
Date: Wed Oct 4 16:08:26 2017 +0530
* Read reverse flow entry after acquiring the lock
In case of short lived TCP session using same 5 tuple we might
end up accesssing a reverse flow entry which might be already deleted
and present in free list. Below set of events lead to this issue
1. F1 and R1 flow are added to flow table
2. R1 is written to vrouter
3. F1 is written to vrouter
4. R1 flow add response is received, triggering update of
F1(not needed now as reverse flow index is not written to
kernel?)
5. In the meantime flow is evicted in vrouter, hence flow
update for F1 would result in error from vrouter resulting in short flow
6. Since F1 is shortflow Flow delete gets enqueued
7. Since R1 is evict marked, flow evict gets enqueued
8. Both event F1 and R1 delete and evict event can run in
parallel,and hence reverse flow pointer obtained before FLOW
lock could be invalid, hence read back the same
Was able to simulate the same in UT, UT is disabled as it need some
instrumentation to run it to hit the issue
Change-Id: I368f465f9d446b43dfe0e4baa547d8c8cbfd6840
Closes-bug: #1714371
(cherry picked from commit a0cb1666537424d81d6989e87c781f241d9ef41b)
Reviewed: https:/ /review. opencontrail. org/36447 github. com/Juniper/ contrail- controller/ commit/ 4bcecc0547f5886 bf0a3c864581743 7d87d312e4
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: master
commit 4bcecc0547f5886 bf0a3c864581743 7d87d312e4
Author: Naveen N <email address hidden>
Date: Wed Oct 4 16:08:26 2017 +0530
* Read reverse flow entry after acquiring the lock
In case of short lived TCP session using same 5 tuple we might
end up accesssing a reverse flow entry which might be already deleted
and present in free list. Below set of events lead to this issue
1. F1 and R1 flow are added to flow table
2. R1 is written to vrouter
3. F1 is written to vrouter
4. R1 flow add response is received, triggering update of
F1(not needed now as reverse flow index is not written to
kernel?)
5. In the meantime flow is evicted in vrouter, hence flow
update for F1 would result in error from vrouter resulting in short flow
6. Since F1 is shortflow Flow delete gets enqueued
7. Since R1 is evict marked, flow evict gets enqueued
8. Both event F1 and R1 delete and evict event can run in
parallel,and hence reverse flow pointer obtained before FLOW
lock could be invalid, hence read back the same
Was able to simulate the same in UT, UT is disabled as it need some
instrumentation to run it to hit the issue
Change-Id: I368f465f9d446b 43dfe0e4baa547d 8c8cbfd6840 81d6989e87c781f 241d9ef41b)
Closes-bug: #1714371
(cherry picked from commit a0cb1666537424d