lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 00/15] Make the user mode driver code a better citizen
    Alexei Starovoitov <alexei.starovoitov@gmail.com> writes:

    > 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.
    >
    > With
    > CONFIG_BPFILTER=y
    > CONFIG_BPFILTER_UMH=m
    > it doesn't build:
    >
    > ERROR: modpost: "kill_pid_info" [net/bpfilter/bpfilter.ko] undefined!
    >
    > I've added:
    > +EXPORT_SYMBOL(kill_pid_info);
    > 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.

    Thanks. I will take a look.

    Eric

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