Thu 30 Nov 2006 07:45:52 AM UTC, original submission:
With syscall hooking in use, dazuko unload causes occasional oopses for random processes.
I'm not exactly sure why, but my best guess is a restarted syscall: a process had an active syscall which was interrupted, and pointer to dazuko code area was stored as the restart point. During this time dazuko is unloaded, and on process' resume, the memory area is not anymore valid, causing an oops for that process.
As a workaround, I managed to get over this by forcing the rmmod (or whatever process doing the module unloading) to sleep for a while after unhooking. The idea being that during this sleep the interrupted syscalls in other processes resume to dazuko code that is still in kernel memory space.
Without the workaround, I was able to reproduce this with about once / 10 unloads. With the workaround, I couldn't repro with a 1000 unloads.
I did it with following code after all unhooking:
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(2000);
where 2000 is an arbitrary, randomly selected number that in the system in question (SuSE Linux 10.0, 2.6.13-15-smp #1 running on a Intel(R) Xeon(TM) CPU 3.20GHz) seemed to be for approximately 4 seconds IIRC. Starting from kernel version 2.6.9 or so, there is also a function msecs_to_jiffies() which can be used to get more controlled delay.
|