[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: do_gettimeofday() system crash
On Tue, Jul 17, 2001 at 03:43:26PM +0100, Oliver Ryan wrote:
> Hi,
>
> I insmod a kernel module which calls do_gettimeofday in the following way:
>
> struct timeval *timecount;
>
> do_gettimeofday(timecount);
>
> This causes a segmentation fault with the following error repeated on the screen:
> VFS: Disk change detected on device ide1(22,0).
>
> Does anyone know what happened?
You write to some random kernel memory as timecount is a pointer initialized with
some random value on the stack..
try:
struct timeval timecount;
do_gettimeofday(&timecount);
instead..
Christoph
--
Of course it doesn't work. We've performed a software upgrade.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/