On Fri, Dec 7, 2012 at 9:05 AM, Tim Gardner
wrote:
> On 12/06/2012 03:46 PM, Dave Airlie wrote:
>
>>>
>>> ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER,
>>> "wc");
>>>
>>> @@ -817,6 +821,7 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob,
>>> unsigned max_pages)
>>>
On 12/06/2012 03:46 PM, Dave Airlie wrote:
ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc");
@@ -817,6 +821,7 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob,
unsigned max_pages)
&glob->kobj, "pool");
if (unlikely(r
On Fri, Dec 7, 2012 at 9:05 AM, Tim Gardner wrote:
> On 12/06/2012 03:46 PM, Dave Airlie wrote:
>
>>>
>>> ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER,
>>> "wc");
>>>
>>> @@ -817,6 +821,7 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob,
>>> unsigned max_pages)
>>>
On Thu, Dec 6, 2012 at 4:20 PM, Tim Gardner
wrote:
> Memory for _manager is allocated using kzalloc() but the result is not
> checked.
>
> Free _manager on error lest memory become orphaned.
>
> I was led to scrutinize ttm_page_alloc_init() from a smatch warning:
>
> drivers/gpu/drm/ttm/ttm_page
On 12/06/2012 03:46 PM, Dave Airlie wrote:
>>
>> ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc");
>>
>> @@ -817,6 +821,7 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob,
>> unsigned max_pages)
>> &glob->kobj, "pool");
>>
On Thu, Dec 6, 2012 at 4:20 PM, Tim Gardner wrote:
> Memory for _manager is allocated using kzalloc() but the result is not
> checked.
>
> Free _manager on error lest memory become orphaned.
>
> I was led to scrutinize ttm_page_alloc_init() from a smatch warning:
>
> drivers/gpu/drm/ttm/ttm_page_
Memory for _manager is allocated using kzalloc() but the result is not checked.
Free _manager on error lest memory become orphaned.
I was led to scrutinize ttm_page_alloc_init() from a smatch warning:
drivers/gpu/drm/ttm/ttm_page_alloc.c:799 ttm_page_alloc_init() error: potential
null dereferen
Memory for _manager is allocated using kzalloc() but the result is not checked.
Free _manager on error lest memory become orphaned.
I was led to scrutinize ttm_page_alloc_init() from a smatch warning:
drivers/gpu/drm/ttm/ttm_page_alloc.c:799 ttm_page_alloc_init() error: potential
null dereferen