The HyperNews Linux KHG Discussion Pages

Question: interrupt handler page faults

Forum: Device Drivers
Keywords: interrupt handler page fault
Date: Mon, 20 Apr 1998 09:51:28 GMT
From: Carl Schwartz <schwcarl@e-z.net>

  I am getting occasional 'page faults' when using 'put_user' to pass values to a 'user' buffer allocated with malloc.
  My application involves a D/A board with onboard timer which dma's values from kernel memory to output a waveform.  The dma timer also asserts an interrupt which initiates A/D measurement.  It all works fine except for occasional page faults, especially during the initial run after logging on.  Using verify_area  as a condition prior to put_user eliminates the page faults by not trying to send the values to user memory.  I had acquired the memory in user with 'malloc'.  I
used mlock and munlock in user code which did not seem to make
difference.
  In my driver, I check with verify_area twice before the measurements begin and once after they are all over with.  All the checks return a '0' except the one within the handler (occasional -14 = not good address).
  I am running 2.0.31 on a Winbook XP 486DX4/75 plugged into ISA docking station.

Carl Schwartz