Re: [Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread samuel.pitoiset
On 27/10/2015 11:08, Julien Isorce wrote: Looks good though what happened to the del around if (!oclass) in nv30_screen_create ? Yeah, good catch. I think we could use FAIL_SCREEN_INIT() there. I'll send a new patch with this fix. Also it seems to fix the other problem around else if (dupfd

Re: [Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread Julien Isorce
Looks good though what happened to the del around if (!oclass) in nv30_screen_create ? Also it seems to fix the other problem around else if (dupfd) which was not closed on failure. On 27 October 2015 at 09:10, samuel.pitoiset wrote: > What about this one http://hastebin.com/uboruxicof.coffee ?

Re: [Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread samuel.pitoiset
What about this one http://hastebin.com/uboruxicof.coffee ? This patch is loosely based on your first attempt, except that I removed the call to nouveau_device_del() in nouveau_drm_screen_create(). On 27/10/2015 09:52, Julien Isorce wrote: This patch prevents to call nouveau_device_del twice

[Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread Julien Isorce
This patch prevents to call nouveau_device_del twice on the same device. Encountered this case when nvc0_screen_create fails with: nvc0_screen_create:717 - Error allocating PGRAPH context for M2MF: -16 https://bugs.freedesktop.org/show_bug.cgi?id=70354 Signed-off-by: Julien Isorce --- src/gall