Re: [PATCH net 1/4] umh: add exit routine for UMH process

2019-01-06 Thread Taehee Yoo
On Mon, 7 Jan 2019 at 01:55, David Miller wrote: > > From: Taehee Yoo > Date: Sun, 6 Jan 2019 14:34:52 +0900 > > > How about adding a new PF_UMH flag for task_struct->flags to identify > > UMH process? > > By using this flag, the exit_umh() can avoid unnecessary lookups. > > Yes, that might be mo

Re: [PATCH net 1/4] umh: add exit routine for UMH process

2019-01-06 Thread David Miller
From: Taehee Yoo Date: Sun, 6 Jan 2019 14:34:52 +0900 > How about adding a new PF_UMH flag for task_struct->flags to identify > UMH process? > By using this flag, the exit_umh() can avoid unnecessary lookups. Yes, that might be more efficient and eliminate the high cost for non-UMH tasks.

Re: [PATCH net 1/4] umh: add exit routine for UMH process

2019-01-05 Thread Taehee Yoo
On Sun, 6 Jan 2019 at 07:10, David Miller wrote: > > From: Taehee Yoo > Date: Mon, 31 Dec 2018 01:31:43 +0900 > > > +void exit_umh(struct task_struct *tsk) > > +{ > > + struct umh_info *info; > > + pid_t pid = tsk->pid; > > + > > + mutex_lock(&umh_list_lock); > > + list_for_each_e

Re: [PATCH net 1/4] umh: add exit routine for UMH process

2019-01-05 Thread David Miller
From: Taehee Yoo Date: Mon, 31 Dec 2018 01:31:43 +0900 > +void exit_umh(struct task_struct *tsk) > +{ > + struct umh_info *info; > + pid_t pid = tsk->pid; > + > + mutex_lock(&umh_list_lock); > + list_for_each_entry(info, &umh_list, list) { So this is probably too expensive of a c

[PATCH net 1/4] umh: add exit routine for UMH process

2018-12-30 Thread Taehee Yoo
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.