[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 00/15] Make the user mode driver code a better citizen
On Mon, Jun 29, 2020 at 02:55:05PM -0500, Eric W. Biederman wrote:
> I have tested thes changes by booting with the code compiled in and
> by killing "bpfilter_umh" and running iptables -vnL to restart
> the userspace driver.
> I have compiled tested each change with and without CONFIG_BPFILTER
> enabled.

it doesn't build:

ERROR: modpost: "kill_pid_info" [net/bpfilter/bpfilter.ko] undefined!

I've added:
to continue testing...

And then did:
while true; do iptables -L;rmmod bpfilter; done

Unfortunately sometimes 'rmmod bpfilter' hangs in wait_event().

I suspect patch 13 is somehow responsible:
+ if (tgid) {
+ kill_pid_info(SIGKILL, SEND_SIG_PRIV, tgid);
+ wait_event(tgid->wait_pidfd, !pid_task(tgid, PIDTYPE_TGID));
+ bpfilter_umh_cleanup(info);
+ }

I cannot figure out why it hangs. Some sort of race ?
Since adding short delay between kill and wait makes it work.

 \ /
  Last update: 2020-06-30 00:15    [W:0.358 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site