Commit 7622a89
bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL
Add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL which could be
used when we want to allow NULL pointer for map parameter. The bpf helper
need to take care and check if the map is NULL when use this type.
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
v13-v18: no update
v11-v12: rebase the patch to latest bpf-next
v10: remove useless CONST_PTR_TO_MAP_OR_NULL and Copy-paste comment.
v9: merge the patch from [1] in to this series.
v1-v8: no this patch
[1] https://lore.kernel.org/bpf/20200715070001.2048207-1-liuhangbin@gmail.com/1 parent 2c5d3f8 commit 7622a89
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
| 455 | + | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| |||
4114 | 4115 | | |
4115 | 4116 | | |
4116 | 4117 | | |
| 4118 | + | |
4117 | 4119 | | |
4118 | 4120 | | |
4119 | 4121 | | |
| |||
4259 | 4261 | | |
4260 | 4262 | | |
4261 | 4263 | | |
4262 | | - | |
4263 | | - | |
4264 | | - | |
| 4264 | + | |
| 4265 | + | |
| 4266 | + | |
4265 | 4267 | | |
4266 | 4268 | | |
4267 | 4269 | | |
| |||
0 commit comments