"fastcall" directive causes "general protection fault"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Can someone explain the "fastcall" directive used in Linux kernel? When I called a
kernel function with this directive, I got a "general protection fault" error. But after I removed the "fastcall"
directive, the problem disappeared. I checked linkage.h and found that fastcall directive essentially tells the compiler
to put the first arguments in registers. But I don't know why that causes the protection failure.

Here is the full story:

I tried to call the following code in a kernel module:

       error = do_path_lookup(AT_FDCWD, "/etc/profile.d/glib2.csh",
LOOKUP_PARENT, &nd);

But do_path_lookup() caused the "general protection fault: 0000 [#1]"
kernel error.

After I removed the "fastcall" from the declaration of do_path_lookup(),
I successfully called do_path_lookup() in my kernel module.

Can someone explain it?

Thanks,      

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux