[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-13 Thread Emil Velikov
On 13/03/14 01:05, Ilia Mirkin wrote: [snip] > > Not really. drm->drm_version will be 0 if ver fails. > Indeed, dev is calloc'ated by its callers, and if they mess around with that's their own fault. Sorry for the noise. -Emil

[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-13 Thread Emil Velikov
On 13/03/14 00:45, Ilia Mirkin wrote: > On Wed, Mar 12, 2014 at 4:45 PM, Emil Velikov > wrote: >> In theory it's possible for any of the nouveau_getparam calls to >> fail whist the last one being successful. >> >> Thus at least one of the following (hard requirements) drmVersion, >> chipset and v

[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-12 Thread Ilia Mirkin
On Wed, Mar 12, 2014 at 9:24 PM, Emil Velikov wrote: > On 13/03/14 01:05, Ilia Mirkin wrote: > [snip] > >> >> Not really. drm->drm_version will be 0 if ver fails. >> > Indeed, dev is calloc'ated by its callers, and if they mess around with > that's their own fault. The callers? It's calloc'd ins

[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-12 Thread Ilia Mirkin
On Wed, Mar 12, 2014 at 9:04 PM, Emil Velikov wrote: > On 13/03/14 00:45, Ilia Mirkin wrote: >> >> On Wed, Mar 12, 2014 at 4:45 PM, Emil Velikov >> wrote: >>> >>> In theory it's possible for any of the nouveau_getparam calls to >>> fail whist the last one being successful. >>> >>> Thus at least

[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-12 Thread Emil Velikov
In theory it's possible for any of the nouveau_getparam calls to fail whist the last one being successful. Thus at least one of the following (hard requirements) drmVersion, chipset and vram/gart memory size will be filled with garbage and sent to the userspace drivers. Signed-off-by: Emil Veliko

[PATCH 1/3] nouveau: cleanup error handling during nouveau_device_wrap

2014-03-12 Thread Ilia Mirkin
On Wed, Mar 12, 2014 at 4:45 PM, Emil Velikov wrote: > In theory it's possible for any of the nouveau_getparam calls to > fail whist the last one being successful. > > Thus at least one of the following (hard requirements) drmVersion, > chipset and vram/gart memory size will be filled with garbag