On Thu, Oct 10, 2013 at 10:56 AM, Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote: > On Wed, Oct 09, 2013 at 09:23:53PM +0200, Daniel Vetter wrote: >> At least on linux sizeof(long) == sizeof(void*) and the thinking >> is that you can grab about as many references as there's memory. > > Well, there can be more memory than there is address space. > > Unchecked counters always leave me a bit uneasy, so an explicit check > is what I'd prefer to see. Not for normal kernel references, but this one here is just userspace. I'll add a UINT_MAX check to the pin ioctl to plug that leak. That'll also make this patch a notch more useful. I'm not going to write a testcase for this though since Ben will complain about the runtime of it ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx