[Intel-gfx] [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr support

Daniel Vetter daniel at ffwll.ch
Fri Nov 21 21:36:33 CET 2014


On Fri, Nov 21, 2014 at 09:27:04PM +0100, Thierry Reding wrote:
> On Sat, Nov 22, 2014 at 03:10:01AM +0800, Yao Cheng wrote:
> > on vlv, if ipvr is installed, it need be manually unloaded before
> > i915, otherwise user might run into use-after-free issue.
> 
> Huh? That doesn't sound right. What exactly is it that's going wrong?
> You should never have to do this. If you do you're almost certainly
> doing something wrong in the kernel module.

It's the hilarity called platform devices. Removing them is somewhat racy,
so doing that upfront makes the entire thing a bit safer. The use after
free is on the text, since grabbing a module refcount for the platform
device doesn't work (it would pin the module forever).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list