Messages in this thread | | | From | Robert Hancock <> | Subject | Re: mechanism to syncronise device access from user and kernel | Date | Fri, 05 Dec 2008 19:08:39 -0600 |
| |
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.
| |