Hi! I have finally discovered, what makes n*gratv fail for me with kernel oopses: The current bttv implementation of close and mmap has some serious security and stability problems: (abstract: rvfree at bttv_close() time is not a good idea, bt848_set_risc_jmps(btv) in bttv_close() does not prevent the grabber from grabbing into the rvfree'ed memory) security: one can close /dev/videox and have still mappings of the buffers. But as close deallocates them, the user can now read (and write) to pages used probably by other processes or the kernel. A program could open, mmap, close many times and get just every ram mapped into its vm space. This should be fixed by freeing the buffer at munmap time. For this reason, videodev.c:video_mmap has to pass vm_area_struct to the driver so it can use vmops->unmap to track the unmap case. (I think we must ensure, the module is present during a mmapped buffer, too) - as this would change the present interface there is no patch yet... stability: one can close /dev/videox and have still outstanding grab requests, so after freeing the pages, they could be reused and corrupted by the grabber. This should be fixed (as it could in the userspace prgs by issuing two syncs at quit time) by stopping the grabber some way (the current way does not work) or waiting 40ms (ugly) - no patch, too. The above stated problems could be easily reproduced by the attached program (umount your big hd's before doing the memory-corruption one :)). Just issue while true; do ./test; done and do some memory stress to the machine. Sooner or later (even after finishing ./test) you get a hard lockup. The security part shows, that after clearing the buffer and closing the device, the memory gets modified (by an other process or the kernel). Richard. PS: all tests were done with the bttv driver shipped with xawtv-2.19, but as the offending code did not change in the experimental driver, it should have still the same problems. #include #include #include #include #include #include #include #include #define BTTV_MAX_FBUF 0x151000 int access_mem(char *mem, int size) { int i, retval=0; volatile int j; for (i=0; i