Hello, On Tuesday, August 30, 2011 3:50 AM Tang, Yu wrote: > As we are trying to adapt to videobuf2, we found here is the potential > issue with user pointer VMA release sequence. It is not aligned with > munmap syscalls behavior, (mm/mmap, remove_vma). > > In the current vb2_put_vma implementation, it will release the file first, > then release VMA. If the file handle is closed, and vma is munmap by user > space, then the file ref count could reach 0 and be freed before the VMA > vm_ops->vm_close is called while vm_close is typically assume the file is > valid when it's called. > > If it's agreed as valid concern, I will submit the fix as below soon. > Thanks! You are definitely right! Thanks for pointing this bug! I will add your patch to my videobuf2 fixes branch. Best regards -- Marek Szyprowski Samsung Poland R&D Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html