drm/i915: Allocate the proper size for contexts.
authorBen Widawsky <ben@bwidawsk.net>
Sat, 10 Nov 2012 18:56:04 +0000 (10:56 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 11 Nov 2012 22:51:47 +0000 (23:51 +0100)
Whoops. This was fixed previously, but not sure how it got lost. It's
not needed for -fixes or stable because at the moment
drm_i915_file_private is way bigger than i915_hw_context (by 120 bytes
on my 64b build).

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c

index 05ed42f203d7a6d6cf4dee63133b529cd665bd90..0e510df80d737613480e7a942fa286eceed3dc3a 100644 (file)
@@ -146,7 +146,7 @@ create_hw_context(struct drm_device *dev,
        struct i915_hw_context *ctx;
        int ret, id;
 
-       ctx = kzalloc(sizeof(struct drm_i915_file_private), GFP_KERNEL);
+       ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
        if (ctx == NULL)
                return ERR_PTR(-ENOMEM);