Skip to content

Commit

Permalink
xenfb: connect to backend before registering fb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Linus Torvalds committed Aug 27, 2009
1 parent 9c504ca commit 0a80fb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/xen-fbfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;

Expand Down

0 comments on commit 0a80fb1

Please sign in to comment.