Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2014-01-27 Thread Rusty Russell
Jan Engelhardt writes: > On Monday 2013-09-16 05:47, Rusty Russell wrote: >> >>Here's what I've got in my pending-rebases tree. >> >>@@ -842,6 +818,11 @@ SYSCALL_DEFINE2(delete_module, const char __user *, >>name_user, >> return -EFAULT; >> name[MODULE_NAME_LEN-1] = '\0'; >>

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2014-01-27 Thread Rusty Russell
Jan Engelhardt jeng...@inai.de writes: On Monday 2013-09-16 05:47, Rusty Russell wrote: Here's what I've got in my pending-rebases tree. @@ -842,6 +818,11 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user, return -EFAULT; name[MODULE_NAME_LEN-1] = '\0'; +

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2014-01-25 Thread Jan Engelhardt
On Monday 2013-09-16 05:47, Rusty Russell wrote: > >Here's what I've got in my pending-rebases tree. > >@@ -842,6 +818,11 @@ SYSCALL_DEFINE2(delete_module, const char __user *, >name_user, > return -EFAULT; > name[MODULE_NAME_LEN-1] = '\0'; > >+ if (!(flags &

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2014-01-25 Thread Jan Engelhardt
On Monday 2013-09-16 05:47, Rusty Russell wrote: Here's what I've got in my pending-rebases tree. @@ -842,6 +818,11 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user, return -EFAULT; name[MODULE_NAME_LEN-1] = '\0'; + if (!(flags O_NONBLOCK)) { +

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-17 Thread Lucas De Marchi
On Mon, Sep 16, 2013 at 12:47 AM, Rusty Russell wrote: > Lucas De Marchi writes: >> On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell wrote: >>> Peter Chen writes: Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. >>>

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-17 Thread Lucas De Marchi
On Mon, Sep 16, 2013 at 12:47 AM, Rusty Russell ru...@rustcorp.com.au wrote: Lucas De Marchi lucas.de.mar...@gmail.com writes: On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell ru...@rustcorp.com.au wrote: Peter Chen peter.c...@freescale.com writes: Currently, if module's refcount is not zero

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-16 Thread Rusty Russell
Lucas De Marchi writes: > On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell wrote: >> Peter Chen writes: >>> Currently, if module's refcount is not zero during the unload, >>> it waits there until the user decreases that refcount. >> >> Hi Peter, >> >> In practice userspace uses

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-16 Thread Rusty Russell
Lucas De Marchi lucas.de.mar...@gmail.com writes: On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell ru...@rustcorp.com.au wrote: Peter Chen peter.c...@freescale.com writes: Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Hi

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Lucas De Marchi
On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell wrote: > Peter Chen writes: >> Currently, if module's refcount is not zero during the unload, >> it waits there until the user decreases that refcount. > > Hi Peter, > > In practice userspace uses O_NONBLOCK. In fact, I've been > thinking

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Peter Chen
On Fri, Sep 13, 2013 at 10:00:33AM +0930, Rusty Russell wrote: > Peter Chen writes: > > Currently, if module's refcount is not zero during the unload, > > it waits there until the user decreases that refcount. > > Hi Peter, > > In practice userspace uses O_NONBLOCK. In fact, I've been

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Rusty Russell
Peter Chen writes: > Currently, if module's refcount is not zero during the unload, > it waits there until the user decreases that refcount. Hi Peter, In practice userspace uses O_NONBLOCK. In fact, I've been thinking of removing the blocking case altogether, since it's not really what

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Rusty Russell
Peter Chen peter.c...@freescale.com writes: Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Hi Peter, In practice userspace uses O_NONBLOCK. In fact, I've been thinking of removing the blocking case altogether,

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Peter Chen
On Fri, Sep 13, 2013 at 10:00:33AM +0930, Rusty Russell wrote: Peter Chen peter.c...@freescale.com writes: Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Hi Peter, In practice userspace uses O_NONBLOCK. In

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Lucas De Marchi
On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell ru...@rustcorp.com.au wrote: Peter Chen peter.c...@freescale.com writes: Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Hi Peter, In practice userspace uses

[RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-11 Thread Peter Chen
Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Assume we have two modules (A & B), there are no symbol relationship between each other. module B is module A's user, if the end user tries to unload module A first wrongly, it

[RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-11 Thread Peter Chen
Currently, if module's refcount is not zero during the unload, it waits there until the user decreases that refcount. Assume we have two modules (A B), there are no symbol relationship between each other. module B is module A's user, if the end user tries to unload module A first wrongly, it will