From: "Jan Beulich" Subject: [PATCH] linux: re-order fbfront initialization Date: Wed, 19 Nov 2008 08:57:32 +0000 Message-ID: <4923E30C.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: Jan Beulich Index: head-2008-11-17/drivers/xen/fbfront/xenfb.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-11-17.orig/drivers/xen/fbfront/xenfb.c 2008-11-17 = 13:42:08.000000000 +0100 +++ head-2008-11-17/drivers/xen/fbfront/xenfb.c 2008-11-18 17:58:35.0000000= 00 +0100 @@ -683,6 +689,10 @@ static int __devinit xenfb_probe(struct=20 } info->fb_info =3D fb_info; =20 + ret =3D xenfb_connect_backend(dev, info); + if (ret < 0) + goto error; + /* FIXME should this be delayed until backend XenbusStateConnected?= */ info->kthread =3D kthread_run(xenfb_thread, info, "xenfb thread"); if (IS_ERR(info->kthread)) { @@ -692,10 +702,6 @@ static int __devinit xenfb_probe(struct=20 goto error; } =20 - ret =3D xenfb_connect_backend(dev, info); - if (ret < 0) - goto error; - return 0; =20 error_nomem: