netd bpf: fix an error discovered by the next compiler update.
flags is uint16_t, but only the low byte is initialized and used. Before the next compiler update, clang optimizes flags to uint8_t, and thus the kernel doesn't complain. But in the next compiler update, clang no longer tries to optimize flags to uint8_t, because of https://reviews.llvm.org/D73997. Then the kernel fails to load netd.o. Because netd.o tries to read the upper byte of flags which was never initialized. Bug: 149839606 Test: build and load netd.o successfully. Change-Id: Ife6e2d7d8c3738e33841989a7f1ee7401bc3c963 Merged-In: Ife6e2d7d8c3738e33841989a7f1ee7401bc3c963
Loading
Please register or sign in to comment