bpf: Fix a warning message in mark_ptr_not_null_reg()
The WARN_ON() argument is a condition, not an error message. So this
code will print a stack trace but will not print the warning message.
Fix that and also change it to only WARN_ONCE().
Fixes: 4ddb74165a
("bpf: Extract nullable reg type conversion into a helper function")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/YCzJlV3hnF%2Ft1Pk4@mwanda
This commit is contained in:
parent
b29dd96b90
commit
33ccec5fd7
|
@ -1120,7 +1120,7 @@ static void mark_ptr_not_null_reg(struct bpf_reg_state *reg)
|
|||
reg->type = PTR_TO_RDWR_BUF;
|
||||
break;
|
||||
default:
|
||||
WARN_ON("unknown nullable register type");
|
||||
WARN_ONCE(1, "unknown nullable register type");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue