* Re: msgsnd in module
[not found] <3AVR2-2UO-5@gated-at.bofh.it>
@ 2005-02-23 23:45 ` Robert Hancock
0 siblings, 0 replies; 2+ messages in thread
From: Robert Hancock @ 2005-02-23 23:45 UTC (permalink / raw)
To: linux-kernel
Vijayalakshmi Hadimani wrote:
> Hi,
> I am inserting a module(device driver) using insmod.
> I want to send a message from this module to an user process.
> For this I used msgsnd with buffer in the call as a local
> variable. I am getting an error "EFAULT" for this call.
> However this did not happen when I made the driver code as a
> part of kernel and not as a module. Any idea about what could
> be the problem and how to solve it?
Well, first off, sending SysV messages from the kernel is a pretty
bizarre thing to do. Secondly, you can't just call the system call from
inside the kernel and pass in kernel memory, because the system call
expects to deal with user-space memory. You'd have to duplicate some or
all of the code of msgsnd and change it to just read the memory directly
instead of using copy_from_user, etc.
^ permalink raw reply [flat|nested] 2+ messages in thread
* msgsnd in module
@ 2005-02-23 4:37 Vijayalakshmi Hadimani
0 siblings, 0 replies; 2+ messages in thread
From: Vijayalakshmi Hadimani @ 2005-02-23 4:37 UTC (permalink / raw)
To: linux-kernel
Hi,
I am inserting a module(device driver) using insmod.
I want to send a message from this module to an user process.
For this I used msgsnd with buffer in the call as a local
variable. I am getting an error "EFAULT" for this call.
However this did not happen when I made the driver code as a
part of kernel and not as a module. Any idea about what could
be the problem and how to solve it?
TIA
Regards,
Vijayalakshmi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-23 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3AVR2-2UO-5@gated-at.bofh.it>
2005-02-23 23:45 ` msgsnd in module Robert Hancock
2005-02-23 4:37 Vijayalakshmi Hadimani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox