summaryrefslogtreecommitdiffstats
path: root/net/bpfilter
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-05-24 00:41:19 -0700
committerDavid S. Miller <davem@davemloft.net>2018-05-24 09:36:49 -0400
commit13405468f49d4b6e014fdf376f46393f9590769d (patch)
tree542efad5e75c50a5cbab3a111e88ccdee6ebe1bf /net/bpfilter
parent61a552eb487f89dd99d480b711b9a073e22ab4c0 (diff)
downloadlinux-13405468f49d4b6e014fdf376f46393f9590769d.tar.bz2
bpfilter: don't pass O_CREAT when opening console for debug
Passing O_CREAT (00000100) to open means we should also pass file mode as the third parameter. Creating /dev/console as a regular file may not be helpful anyway, so simply drop the flag when opening debug_fd. Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bpfilter')
-rw-r--r--net/bpfilter/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bpfilter/main.c b/net/bpfilter/main.c
index 81bbc1684896..1317f108df8a 100644
--- a/net/bpfilter/main.c
+++ b/net/bpfilter/main.c
@@ -55,7 +55,7 @@ static void loop(void)
int main(void)
{
- debug_fd = open("/dev/console", 00000002 | 00000100);
+ debug_fd = open("/dev/console", 00000002);
dprintf(debug_fd, "Started bpfilter\n");
loop();
close(debug_fd);