Re: Strangest bug

Stanislav Krasilovskiy (prgrssor@cs.bu.edu)
Fri, 23 Jul 1999 16:09:54 -0400 (EDT)


> yes, because occasionally the system is executing another process (or the
> idle thread), in which context that user-space pointer makes no sense.
>
> the solution: copy the data into kernel-space, then use this kernel-space
> data from interrupts.
>
> -- mingo

Dear Mingo and others,

Thanks for your help! That explains the bug.

But what if I absolutely need to retrieve the latest values from the
structure (now placed in kernel space) at the time of the interrupt, and
somehow allow the user space process to access/modify it sometimes? How
would I do that?

I searched the 'net for this, and came across a posting mentioning
something similar to setting up a DMA in sound drivers, i.e. setting up
an area in kernel space, locking it and allowing the user proceess to mmap
it into its own memory.

Can something like that be used in my case? Do you know if there's sample
code for doing something like this anywhere?

Thank you very much once again.

+------------------------+----------------------------------------+
| Stan Albright Rost | http://mdsp.bu.edu/prgrssor_html |
| AKA | "You want my advice? -- here it is: |
| "The Progressor" | Go and Work." |
+------------------------+----= Arkadiy and Boris Strugatskiy =---+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/