Commit 77fba26
bpf: Add warnings for internal bugs in map_create
In next commit, it will report users the reason of -EINVAL in
map_create.
However, as for the check of '!ops' and '!ops->map_mem_usage', it
shouldn't report the reason as they would be internal bugs.
Instead, add WARN_ON_ONCE to them. Then, it is able to check dmesg to get
the error details.
Signed-off-by: Leon Hwang <[email protected]>1 parent 88b4130 commit 77fba26
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
| 1409 | + | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
| 1419 | + | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
| |||
0 commit comments