> -----Original Message-----
> From: [email protected] [mailto:linux-omap-
> [email protected]] On Behalf Of Frederik Kriewitz
> Sent: Tuesday, August 18, 2009 8:32 AM
> To: [email protected]
> Subject: OMAPFB: LL pointer dereference because of uninitialized mutex
> 
> Hello,

Hi,

> 
> I'm trying to add support for a omap3 board.
> 
> But I get a NULL pointer dereference during initialization of the lcd
> panel driver because framebufferInfo->mm_lock wasn't initialized.
> 
> Code of the lcd driver: http://pastebin.com/m44ccc56d (nothing special)
> 
> Stack trace:
> __mutex_lock_slowpath()
> mutex_lock()
> set_fb_fix()
> omapfb_do_probe()
> devkit8000_panel_probe() << my probe function
> platform_drv_probe()
> ...
> 
> It get's initialized in register_framebuffer() but in my case the
> probe function gets called before register_framebuffer().
> 
> Once I added the missing inits to framebuffer_alloc()
> (drivers/video/fbsysfs.c) it works fine:
> mutex_init(&info->lock);
> mutex_init(&info->mm_lock);
> 
> How I'm intended to fix this?

Can you try attached patch, and let me know if worked for you?

Regards,
Sergio
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: 0001-omapfb-Reorder-Register_framebuffer-call.patch
Description: 0001-omapfb-Reorder-Register_framebuffer-call.patch

Reply via email to