diff options
| author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-08-27 15:22:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-27 15:31:18 -0400 |
| commit | 0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2 (patch) | |
| tree | 580b0763d60546ab23953b376d2a9264b3e64bf2 | |
| parent | 9c504cadc443a3d002fa581ec5109c0ef02d7b14 (diff) | |
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 <mschmidt@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | drivers/video/xen-fbfront.c | 8 |
1 files changed, 4 insertions, 4 deletions
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, | |||
| 454 | 454 | ||
| 455 | xenfb_init_shared_page(info, fb_info); | 455 | xenfb_init_shared_page(info, fb_info); |
| 456 | 456 | ||
| 457 | ret = xenfb_connect_backend(dev, info); | ||
| 458 | if (ret < 0) | ||
| 459 | goto error; | ||
| 460 | |||
| 457 | ret = register_framebuffer(fb_info); | 461 | ret = register_framebuffer(fb_info); |
| 458 | if (ret) { | 462 | if (ret) { |
| 459 | fb_deferred_io_cleanup(fb_info); | 463 | fb_deferred_io_cleanup(fb_info); |
| @@ -464,10 +468,6 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, | |||
| 464 | } | 468 | } |
| 465 | info->fb_info = fb_info; | 469 | info->fb_info = fb_info; |
| 466 | 470 | ||
| 467 | ret = xenfb_connect_backend(dev, info); | ||
| 468 | if (ret < 0) | ||
| 469 | goto error; | ||
| 470 | |||
| 471 | xenfb_make_preferred_console(); | 471 | xenfb_make_preferred_console(); |
| 472 | return 0; | 472 | return 0; |
| 473 | 473 | ||
