Re: unhandled page fault

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

 



On 7/26/06, Christian Boon <c.boon@xxxxxxxxxxxxxxxxxxxx> wrote:
Hello,

i've got a question about a page fault:

If have a kernel module that puts data in an array from an external fifo
after an interrupt:

static void *datapointer;
__u16 Data[325];

for (Counter = 0 ; Counter < 325; Counter++)
{
  Data[Counter] = readw(datapointer);
}
wake_up_interruptible(&waitqueue);

My application is sleeping on the waitqueue.

in the application:

typedef unsigned char u8;
u8 VideoData[650];

bytes = read(fd, VideoData, sizeof(u8));

So i want to store the array u16 and read in userspace u8.
is this a problem? maybe alignment?

sometimes i get this error:

PraxisSC: unhandled page fault at pc=0x40026df0, lr=0x40089790 (bad
address=0x40026df0, code 0)
pc : [<40026df0>]    lr : [<40089790>]    Not tainted
sp : bf3fbb58  ip : bf3ffcac  fp : bf3ffca8
r10: 0201d6d6  r9 : 00000001  r8 : 0201d6cc
r7 : 0201d6cc  r6 : bf3ffd04  r5 : 0201e2bc  r4 : 00000001
r3 : 00989680  r2 : 00000000  r1 : 00000000  r0 : 0000000b
Flags: nzcv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: 397F  Table: A04DC000  DAC: 00000015

Does this mean that the error occured in my application or is it an
error in my kernel module?
And what is happening here? because it happens after some time, not
immidiately.

One thing is for sure that the page fault is occuring in kernel mode,
so the error is somewhere in your kernel code. As you have not posted
the whole of the code it wont be possible to pin point exactly the
source of this page fault.

Moreover I and wondering how you have used "read()" routine in kernel module ??

Gaurav



thanks in advance,

Chris.








--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
Gaurav
Email: gauravd.chd@xxxxxxxxx
--------------------------------------------
Read my articles at: http://lkdp.blogspot.com
--------------------------------------------
Easy to get air tickets at affordable price,
US to India Air Tickets: www.Ritz-Travel.com
Call at 001-503-848-2299 or mail at info@xxxxxxxxxxxxxxx
--------------------------------------------

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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