Re: [PATCH 3.7-rc8] ttm: Fix possible _manager memory allocation oops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(ret != 0)) {
                 kobject_put(&_manager->kobj);
+               kfree(_manager);
                 _manager = NULL;

I don;t think this is, since the kobject_put shuold free it.


kobject_put only frees memory referenced by kobj, but not the memory pointed at by _manager.

rtg
--
Tim Gardner tim.gardner@xxxxxxxxxxxxx
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux