]> git.baikalelectronics.ru Git - kernel.git/commit
umh: add exit routine for UMH process
authorTaehee Yoo <ap420073@gmail.com>
Tue, 8 Jan 2019 17:23:56 +0000 (02:23 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jan 2019 02:05:40 +0000 (18:05 -0800)
commit5858223c1af0df905d4b2a8f6c7cf719370afd4e
tree597da57b75e0bceceea75e1cbf9980068bc5dc54
parent67310c37a8ec7c031eddaa97cbdcf9117ef7aac1
umh: add exit routine for UMH process

A UMH process which is created by the fork_usermode_blob() such as
bpfilter needs to release members of the umh_info when process is
terminated.
But the do_exit() does not release members of the umh_info. hence module
which uses UMH needs own code to detect whether UMH process is
terminated or not.
But this implementation needs extra code for checking the status of
UMH process. it eventually makes the code more complex.

The new PF_UMH flag is added and it is used to identify UMH processes.
The exit_umh() does not release members of the umh_info.
Hence umh_info->cleanup callback should release both members of the
umh_info and the private data.

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sched.h
include/linux/umh.h
kernel/exit.c
kernel/umh.c