Skip to contentSkip to conversation

linux: re-order fbfront initialization

PATCH New Jan Beulich 1 participant 1 message Nov 19, 2008 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: re-order fbfront initialization

The helper thread shouldn't be started before xenfb_connect_backend(), to avoid the thread using the potentially not yet initialized irq.

As usual, written and tested on 2.6.27.6 and made apply to the 2.6.18 tree without further testing.

drivers/xen/fbfront/xenfb.c +4 -4
Index: head-2008-11-17/drivers/xen/fbfront/xenfb.c
===================================================================
@@ -683,6 +689,10 @@ static int __devinit xenfb_probe(struct 
 	}
 	info->fb_info = fb_info;
 
+	ret = xenfb_connect_backend(dev, info);
+	if (ret < 0)
+		goto error;
+
 	/* FIXME should this be delayed until backend XenbusStateConnected? */
 	info->kthread = kthread_run(xenfb_thread, info, "xenfb thread");
 	if (IS_ERR(info->kthread)) {
@@ -692,10 +702,6 @@ static int __devinit xenfb_probe(struct 
 		goto error;
 	}
 
-	ret = xenfb_connect_backend(dev, info);
-	if (ret < 0)
-		goto error;
-
 	return 0;
 
  error_nomem: