Re: owner field in `struct fs'

Rusty Russell (rusty@linuxcare.com.au)
Tue, 27 Jun 2000 23:30:05 +1000


In message <2646.962105979@ocs3.ocs-net> you write:
> On Mon, 26 Jun 2000 02:25:13 +1000,
> Rusty Russell <rusty@linuxcare.com.au> wrote:
> >However, my request for sane module semantics remains for other
> >subsystems. There are other problems[1], but this addresses an important
> >one.
> >[1] We also need to sync against timers before freeing the module memory.
>
> Is this problem not a subset of the existing timer cleanup? Timers and
> modules are only a problem if the module cleanup code exits to
> delete_module() while the timer is still running. I understood that
> Andrew Morton's work would force timer deletion to wait until the timer
> had been fully deleted.

AFAIK his work never went in/was never completed 8( So del_timer_sync
doesn't work on self-deleting timers.

If the timer was the one to call the final MOD_DEC_USE_COUNT(), it
might still be in the module, while we free underneath it on the other
CPU. That is the last (unlikely-to-happen-in-practice) known timer
hole in my code, and I'd prefer it solved in sys_delete_module()
rather than me doing it explicitly in cleanup().

Fortunately, it's a one-line `spin_unlock_wait(&global_bh_lock);'
addition after mod->cleanup().

Rusty.
BTW: why does sys_init_module return -EBUSY not mod->init()'s return val?

--
Hacking time.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/