Re: 1.3.72 mouse module CRASH (again...) (longish)

Bjorn Ekwall (bj0rn@blox.se)
Sat, 16 Mar 1996 09:49:31 +0100 (MET)


Chris wrote:
>
> Mar 16 03:55:17 jcr00 kernel: PS/2 auxiliary pointing device detected -- driver installed.
> Mar 16 03:56:16 jcr00 kernel: Unable to handle kernel paging request at virtual address c100d583

Aha! One minute later that is...

>
[...]
>
> EIP: 100d583 = poll_aux_status (see assumption above)
> 100d025 = aux_write_cmd "
> 100d1e6 = open_aux " }
> 100b040 = mouse_open " } - These seem highly
> plausible
> 1217dd = chrdev_open }
> 11fd76 = do_open }
> 11fe2e = sys_open } Directly from System.map
> 10a469 = system_call }

There is a schedule() call in poll_aux_status() (and elsewhere) that
seems to be called while the usage count is zero! Since kerneld
is looking for these modules and sees them as "dead meat", it removes
the module while it is waiting to be re-scheduled... Oops indeed!

I haven't made a thorough inspection of the code, but I strongly suggest
that the usage count should _not_ be zero when rescheduling.

So, there is a need for some well-placed MOD_INC_USE_COUNT / MOD_DEC_USE_COUNT
pairs in the code. The only remaining problem is to decide _where_ ...

Bjorn <bj0rn@blox.se> <http://www.pi.se/blox/>

> That's it folks... hope this long mail will provide more info to that
> annoying OOPS.
>
> -- Chris
>
>