linux/net/bpfilter
Taehee Yoo 61fbf5933d net: bpfilter: restart bpfilter_umh when error occurred
The bpfilter_umh will be stopped via __stop_umh() when the bpfilter
error occurred.
The bpfilter_umh() couldn't start again because there is no restart
routine.

The section of the bpfilter_umh_{start/end} is no longer .init.rodata
because these area should be reused in the restart routine. hence
the section name is changed to .bpfilter_umh.

The bpfilter_ops->start() is restart callback. it will be called when
bpfilter_umh is stopped.
The stop bit means bpfilter_umh is stopped. this bit is set by both
start and stop routine.

Before this patch,
Test commands:
   $ iptables -vnL
   $ kill -9 <pid of bpfilter_umh>
   $ iptables -vnL
   [  480.045136] bpfilter: write fail -32
   $ iptables -vnL

All iptables commands will fail.

After this patch,
Test commands:
   $ iptables -vnL
   $ kill -9 <pid of bpfilter_umh>
   $ iptables -vnL
   $ iptables -vnL

Now, all iptables commands will work.

Fixes: d2ba09c17a ("net: add skeleton of bpfilter kernel module")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-11 18:05:41 -08:00
..
.gitignore bpfilter: ignore binary files 2018-06-20 09:07:46 +09:00
bpfilter_kern.c net: bpfilter: restart bpfilter_umh when error occurred 2019-01-11 18:05:41 -08:00
bpfilter_umh_blob.S net: bpfilter: restart bpfilter_umh when error occurred 2019-01-11 18:05:41 -08:00
Kconfig bpfilter: remove trailing newline 2018-07-24 14:10:42 -07:00
main.c bpfilter: don't pass O_CREAT when opening console for debug 2018-05-24 09:36:49 -04:00
Makefile kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS 2018-07-18 01:18:05 +09:00
msgfmt.h