* mechanism to syncronise device access from user and kernel
@ 2008-12-05 18:28 Parav Pandit
2008-12-06 1:08 ` Robert Hancock
2008-12-06 12:40 ` Matthew Garrett
0 siblings, 2 replies; 3+ messages in thread
From: Parav Pandit @ 2008-12-05 18:28 UTC (permalink / raw)
To: Linux kernel
Hi,
I have a device whose registers are accessed by driver as well as user space application via mmap() area.
How to synchronize the access (avoid race condition) between user space driver and kernel mode driver, in single CPU and multi-CPU systems?
Regards,
Parav Pandit
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mechanism to syncronise device access from user and kernel
2008-12-05 18:28 mechanism to syncronise device access from user and kernel Parav Pandit
@ 2008-12-06 1:08 ` Robert Hancock
2008-12-06 12:40 ` Matthew Garrett
1 sibling, 0 replies; 3+ messages in thread
From: Robert Hancock @ 2008-12-06 1:08 UTC (permalink / raw)
To: linux-kernel
Parav Pandit wrote:
> Hi,
>
> I have a device whose registers are accessed by driver as well as user space application via mmap() area.
>
> How to synchronize the access (avoid race condition) between user space driver and kernel mode driver, in single CPU and multi-CPU systems?
This doesn't seem like the best idea in the first place.. certainly not
if unprivileged processes can get access to the registers, as there's no
way to require them to follow the synchronization process. Generally a
given set of registers should be driven by a kernel driver or a
userspace process, not both.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mechanism to syncronise device access from user and kernel
2008-12-05 18:28 mechanism to syncronise device access from user and kernel Parav Pandit
2008-12-06 1:08 ` Robert Hancock
@ 2008-12-06 12:40 ` Matthew Garrett
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Garrett @ 2008-12-06 12:40 UTC (permalink / raw)
To: Parav Pandit; +Cc: Linux kernel
On Fri, Dec 05, 2008 at 10:28:27AM -0800, Parav Pandit wrote:
> Hi,
>
> I have a device whose registers are accessed by driver as well as user space application via mmap() area.
>
> How to synchronize the access (avoid race condition) between user space driver and kernel mode driver, in single CPU and multi-CPU systems?
Rewrite userspace to use the kernel driver?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-06 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-05 18:28 mechanism to syncronise device access from user and kernel Parav Pandit
2008-12-06 1:08 ` Robert Hancock
2008-12-06 12:40 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox