From: Jeremy Fitzhardinge Date: Thu, 27 Aug 2009 19:22:43 +0000 (-0700) Subject: xenfb: connect to backend before registering fb X-Git-Tag: MMI-PSA29.97-13-9~27065 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git xenfb: connect to backend before registering fb As soon as the framebuffer is registered, our methods may be called by the kernel. This leads to a crash as xenfb_refresh() gets called before we have the irq. Connect to the backend before registering our framebuffer with the kernel. [ Fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=14059 ] Signed-off-by: Michal Schmidt Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index 15502d5e3641..54cd91610174 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c @@ -454,6 +454,10 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, xenfb_init_shared_page(info, fb_info); + ret = xenfb_connect_backend(dev, info); + if (ret < 0) + goto error; + ret = register_framebuffer(fb_info); if (ret) { fb_deferred_io_cleanup(fb_info); @@ -464,10 +468,6 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, } info->fb_info = fb_info; - ret = xenfb_connect_backend(dev, info); - if (ret < 0) - goto error; - xenfb_make_preferred_console(); return 0;