[Intel-gfx] [PATCH 3/4] drm/i915: Use unsigned long for obj->user_pin_count
daniel.vetter at ffwll.ch
Thu Oct 10 10:59:53 CEST 2013
On Thu, Oct 10, 2013 at 10:56 AM, Ville Syrjälä
<ville.syrjala at linux.intel.com> 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
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx