]> git.baikalelectronics.ru Git - kernel.git/commit
bpfilter: Specify the log level for the kmsg message
authorGary Lin <glin@suse.com>
Wed, 23 Jun 2021 04:09:18 +0000 (12:09 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 25 Jun 2021 11:13:50 +0000 (13:13 +0200)
commit06ccbb7359b4b1268f539df9c88ab27fcd09cdcc
treee3acaef4f2f37277fb8c626cf7a471d04b7d2142
parent540e35fbba1d2d9809ce66597286ca59e9aa485d
bpfilter: Specify the log level for the kmsg message

Per the kmsg document [0], if we don't specify the log level with a
prefix "<N>" in the message string, the default log level will be
applied to the message. Since the default level could be warning(4),
this would make the log utility such as journalctl treat the message,
"Started bpfilter", as a warning. To avoid confusion, this commit
adds the prefix "<5>" to make the message always a notice.

  [0] https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg

Fixes: 6eeced1d1e3f ("net: bpfilter: print umh messages to /dev/kmsg")
Reported-by: Martin Loviska <mloviska@suse.com>
Signed-off-by: Gary Lin <glin@suse.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Dmitrii Banshchikov <me@ubique.spb.ru>
Link: https://lore.kernel.org/bpf/20210623040918.8683-1-glin@suse.com
net/bpfilter/main.c