Do not run mapLockTest on 4.9 kernels
bpfLock() does nothing on 4.9 as it relies on bpfGetFdMapId which is not available until 4.14. Change-Id: Ib737db61a5d8fb39bcbbe1bb5937afb0c63bd1d1 Test: TH Bug: 349034378
This commit is contained in:
parent
73748afc57
commit
78ad0039bf
1 changed files with 4 additions and 1 deletions
|
|
@ -260,7 +260,10 @@ static void mapLockTest(void) {
|
|||
}
|
||||
|
||||
Status BpfHandler::initMaps() {
|
||||
mapLockTest();
|
||||
// bpfLock() requires bpfGetFdMapId which is only available on 4.14+ kernels.
|
||||
if (bpf::isAtLeastKernelVersion(4, 14, 0)) {
|
||||
mapLockTest();
|
||||
}
|
||||
|
||||
RETURN_IF_NOT_OK(mStatsMapA.init(STATS_MAP_A_PATH));
|
||||
RETURN_IF_NOT_OK(mStatsMapB.init(STATS_MAP_B_PATH));
|
||||
|
|
|
|||
Loading…
Reference in a new issue