bpf: Fix a warning message in mark_ptr_not_null_reg()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 17 Feb 2021 07:45:25 +0000 (10:45 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 22 Feb 2021 17:03:11 +0000 (18:03 +0100)
commit33ccec5fd740d0d5b78b77846f76eb5b4feb4327
tree2d7166d78701e201861a45c1892d840cc1ddfe4d
parentb29dd96b905f3dd543f4ca729447286adf934dd6
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: 4ddb74165ae5 ("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
kernel/bpf/verifier.c