-
Notifications
You must be signed in to change notification settings - Fork 143
selftests/bpf: fix list_del() in arena list #10020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Upstream branch: 48a97ff |
|
Upstream branch: 48a97ff |
1ac9d46 to
c14179c
Compare
2226789 to
3763655
Compare
|
Upstream branch: 48a97ff |
c14179c to
51ccbe9
Compare
3763655 to
47fa79c
Compare
|
Upstream branch: 50de48a |
51ccbe9 to
0af125f
Compare
47fa79c to
6d36951
Compare
The __list_del fuction doesn't set the previous node's next pointer to the next node of the node to be deleted. It just updates the local variable and not the actual pointer in the previous node. The test was passing up till now because the bpf code is doing bpf_free() after list_del and therfore reading head->first from the userspace will read all zeroes. But after arena_list_del() is finished, head->first should point to NULL; If you remove the bpf_free() call in arena_list_del(), the test will start crashing because now the userpsace will read 0x100 (LIST_POISON1) in head->first and segfault. Signed-off-by: Puranjay Mohan <[email protected]> Acked-by: Yonghong Song <[email protected]>
|
Upstream branch: 4f8543b |
0af125f to
24f8d3a
Compare
6d36951 to
6116807
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1012896 irrelevant now. Closing PR. |
Pull request for series with
subject: selftests/bpf: fix list_del() in arena list
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1012896