[PATCH v2 linux-next] i915: intel_set_mode: Reduce stack allocation from 500 bytes to 2 pointers

Daniel Vetter daniel at ffwll.ch
Mon Dec 10 01:14:07 PST 2012


On Mon, Dec 10, 2012 at 09:29:17AM +0200, Jani Nikula wrote:
> On Fri, 07 Dec 2012, Tim Gardner <tim.gardner at canonical.com> wrote:
> > smatch warning:
> >
> > drivers/gpu/drm/i915/intel_display.c:7019 intel_set_mode() warn: function puts
> > 500 bytes on stack
> >
> > Refactor so that saved_mode and saved_hwmode are dynamically allocated as opposed
> > to being automatic variables. 500 bytes seems like it could run the potential for blowing
> > the kernel stack.
> 
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list