OSDN Git Service

staging: comedi: support vm_access_process for mmap'd buffer
authorIan Abbott <abbotti@mev.co.uk>
Thu, 20 Apr 2017 18:05:14 +0000 (19:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Apr 2017 18:43:42 +0000 (20:43 +0200)
commit255364f7b8a0fee3fb642b3e1521e943dd67bfb3
tree9b67464441cc98d69eece7d42852637ee3dd89ca
parente44adf05b85e5a9d1d224f5ecde1c1c5e5371e36
staging: comedi: support vm_access_process for mmap'd buffer

If a process that has mmap'd a COMEDI buffer is being run under a
debugger such as GDB, the buffer contents are inaccessible from the
debugger.  Support the `access()` VM operation to allow the buffer
contents to be accessed by another process.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_buf.c
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedi_internal.h