drm via: initialize object_idr
Subsystems (2)
PATCH 1/1 drm via: initialize object_idr
In reply to a message not in the archiveThe field obejct_idr of struct drm_via_private was introduced with the commit
In that patch idr_init(&dev->object_name_idr) was called instead of idr_init(&dev_priv->object_idr) by mistake, leaving the dev_priv->object_idr uninitialized. To be more exact, the object_idr buffer is filled with zeros because of kzalloc(), but the dev_priv->object_idr.lock spinlock can cause system freeze at lib/idr.c:move_to_free_list() when spin_lock_irqsave() is called on this spinlock.
Signed-off-by Márton Németh <[email protected]>
Signed-off-by James Simmons <[email protected]>
drivers/gpu/drm/via/via_map.c +1 -3
@@ -100,12 +100,10 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset)if (dev_priv ==NULL )return -ENOMEM ; +idr_init (&dev_priv->object_idr); dev->dev_private = (void *)dev_priv; - dev_priv->chipset = chipset; -idr_init (&dev->object_name_idr); -pci_set_master (dev->pdev); ret =drm_vblank_init (dev,1 );
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel