Module Name: src Committed By: knakahara Date: Thu Sep 19 06:07:25 UTC 2019
Modified Files: src/sys/net: if.c if.h if_gif.c if_gif.h if_ipsec.c if_ipsec.h if_l2tp.c if_l2tp.h src/sys/netinet: in_gif.c in_l2tp.c src/sys/netinet6: in6_gif.c in6_l2tp.c src/sys/netipsec: ipsecif.c Log Message: Avoid having a rtcache directly in a percpu storage for tunnel protocols. percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones. A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called. Using rtcache, i.e., packet processing, typically involves sleepable operations such as rwlock so we must avoid dereferencing a rtcache that is directly stored in a percpu storage during packet processing. Address this situation by having just a pointer to a rtcache in a percpu storage instead. Reviewed by ozaki-r@ and yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.460 -r1.461 src/sys/net/if.c cvs rdiff -u -r1.276 -r1.277 src/sys/net/if.h cvs rdiff -u -r1.148 -r1.149 src/sys/net/if_gif.c cvs rdiff -u -r1.32 -r1.33 src/sys/net/if_gif.h cvs rdiff -u -r1.23 -r1.24 src/sys/net/if_ipsec.c cvs rdiff -u -r1.4 -r1.5 src/sys/net/if_ipsec.h cvs rdiff -u -r1.37 -r1.38 src/sys/net/if_l2tp.c cvs rdiff -u -r1.7 -r1.8 src/sys/net/if_l2tp.h cvs rdiff -u -r1.94 -r1.95 src/sys/netinet/in_gif.c cvs rdiff -u -r1.16 -r1.17 src/sys/netinet/in_l2tp.c cvs rdiff -u -r1.93 -r1.94 src/sys/netinet6/in6_gif.c cvs rdiff -u -r1.17 -r1.18 src/sys/netinet6/in6_l2tp.c cvs rdiff -u -r1.16 -r1.17 src/sys/netipsec/ipsecif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.