On 04/11/2014 03:05 PM, Tomasz Stanislawski wrote: > Hi Hans, > > On 04/11/2014 10:11 AM, Hans Verkuil wrote: >> From: Hans Verkuil <hans.verkuil@xxxxxxxxx> >> >> Added a vb2_fileio_is_active inline function that returns true if fileio >> is in progress. Check for this too in mmap() (you don't want apps mmap()ing >> buffers used by fileio) and expbuf() (same reason). > > Why? I expect that there is no sane use case for using > mmap() and expbuf in read/write mode but why forbidding this. > > Could you provide a reason? The buffer management is completely internal to vb2 for read()/write(). I think that allowing expbuf/mmap is just plain weird. I don't think it would do any harm other than increasing the memory refcount, but I very much prefer to block this. The only ioctl allowed is querybuf, and that primarily for debugging. Frankly, I wouldn't mind if that is blocked off as well but since it is guaranteed to have no side-effects and it actually has a use-case (debugging) I've left that in. Personally I think the question is not: "why block this?", it is: "why would you allow it?". Regards, Hans -- 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