Messages in this thread | | | Date | Fri, 30 Jan 1998 11:36:21 -0500 (EST) | From | "Benjamin C.R. LaHaise" <> | Subject | Re: Sound driver security hole? |
| |
On Fri, 30 Jan 1998, Itai Nahshon wrote:
> Tom, I tried it and I would say it is not just a bug in the > sound driver. Device close should be called only for the *last* > close on the device. If a device or file is memory mapped > it should still be open internally.
> IMHO this is a bug which is *not* related to the sound driver.
Not quite - you have to remember that mmap() is an operation applying to the inode pointed to by the file descriptor, hence its existance well after the fd is closed. If a device driver needs to hold onto resources for the duration of an mmap()ing, then it should lock/unlock by providing its own open and close functions in the vm_ops for the vma. Changing the sound driver to obey the semantics of the mm layer might be a bit of a pain, but it's the Right Thing(tm) to do.
-ben
| |