gvisor/pkg
Ghanan Gowripalan 8e6e87f8e8 Allow 'out-of-line' routing table updates for Router and Prefix discovery events
This change removes the requirement that a new routing table be provided when a
router or prefix discovery event happens so that an updated routing table may
be provided to the stack at a later time from the event.

This change is to address the use case where the netstack integrator may need to
obtain a lock before providing updated routes in response to the events above.

As an example, say we have an integrator that performs the below two operations
operations as described:
A. Normal route update:
  1. Obtain integrator lock
  2. Update routes in the integrator
  3. Call Stack.SetRouteTable with the updated routes
    3.1. Obtain Stack lock
    3.2. Update routes in Stack
    3.3. Release Stack lock
  4. Release integrator lock
B. NDP event triggered route update:
  1. Obtain Stack lock
  2. Call event handler
    2.1. Obtain integrator lock
    2.2. Update routes in the integrator
    2.3. Release integrator lock
    2.4. Return updated routes to update Stack
  3. Update routes in Stack
  4. Release Stack lock

A deadlock may occur if a Normal route update was attemped at the same time an
NDP event triggered route update was attempted. With threads T1 and T2:
1) T1 -> A.1, A.2
2) T2 -> B.1
3) T1 -> A.3 (hangs at A.3.1 since Stack lock is taken in step 2)
4) T2 -> B.2 (hangs at B.2.1 since integrator lock is taken in step 1)

Test: Existing tests were modified to not provide or expect routing table
changes in response to Router and Prefix discovery events.
PiperOrigin-RevId: 286274712
2019-12-18 15:18:33 -08:00
..
abi Implement checks for get/setxattr at the syscall layer. 2019-12-16 13:20:07 -08:00
amutex Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
atomicbitops Enable pkg/atomicbitops support on arm64. 2019-10-09 03:09:52 +00:00
binary Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
bits Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
bpf Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
compressio Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
control Update canonical repository. 2019-06-13 16:50:15 -07:00
cpuid Add more extended features. 2019-11-11 14:42:57 -08:00
eventchannel Import and structure cleanup. 2019-11-21 11:41:30 -08:00
fd Cleanup host UDS support 2019-10-18 15:33:03 -07:00
fdchannel Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
fdnotifier Change syscall.EPOLLET to unix.EPOLLET 2019-08-05 23:10:08 +00:00
flipcall Import and structure cleanup. 2019-11-21 11:41:30 -08:00
fspath Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
gate Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
ilist Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
linewriter Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
log Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
memutil Update canonical repository. 2019-06-13 16:50:15 -07:00
metric internal BUILD file cleanup. 2019-09-23 08:25:13 -07:00
p9 Remove useless comments from p9/handlers.go. 2019-12-16 16:32:59 -08:00
procid Update build tags to allow Go 1.14 2019-10-29 13:18:16 -07:00
rand Update canonical repository. 2019-06-13 16:50:15 -07:00
refs Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
seccomp Enable runsc/boot support on arm64. 2019-11-13 06:39:11 +00:00
secio Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
segment Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
sentry Merge pull request #1322 from lubinszARM:pr_vfp_ring0 2019-12-18 14:52:35 -08:00
sleep Update build tags to allow Go 1.14 2019-10-29 13:18:16 -07:00
state Import and structure cleanup. 2019-11-21 11:41:30 -08:00
syncutil Bump up Go 1.13 as minimum requirement 2019-12-06 23:10:15 -08:00
syserr netstack/udp: connect with the AF_UNSPEC address family means disconnect 2019-07-03 14:19:02 -07:00
syserror Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
tcpip Allow 'out-of-line' routing table updates for Router and Prefix discovery events 2019-12-18 15:18:33 -08:00
tmutex Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
unet Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
urpc Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
waiter Cleanup visibility. 2019-11-23 23:54:41 -08:00