From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aurelien Chartier Subject: Re: [PATCH V4 2/2] xenbus: delay xenbus frontend resume if xenstored is not running Date: Thu, 16 May 2013 15:59:48 +0100 Message-ID: <5194F464.4050901@citrix.com> References: <1368707680-21816-1-git-send-email-aurelien.chartier@citrix.com> <1368707680-21816-3-git-send-email-aurelien.chartier@citrix.com> <5194FC1D02000078000D6C07@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5194FC1D02000078000D6C07@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , david.vrabel@citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 16/05/13 14:32, Jan Beulich wrote: >>>> On 16.05.13 at 14:34, Aurelien Chartier wrote: >> @@ -440,6 +467,13 @@ static int __init xenbus_probe_frontend_init(void) >> >> register_xenstore_notifier(&xenstore_notifier); >> >> + xenbus_frontend_wq = create_workqueue("xenbus_frontend"); >> + if (!xenbus_frontend_wq) { >> + printk(KERN_ERR "%s: create " >> + "xenbus_frontend_workqueue failed\n", __func__); > pr_err() should be the norm these days. > > And personally I consider it quite bad a habit to put function names > in non-debugging log messages - this doesn't really help with > anything (as long as the rest of the message is meaningful), but > clutters the log. I was using the same format as pciback error handling, but I can switch to pr_err. > And finally, you need to do proper error handling here - this code > can be built as a module, and hence leaving notifier and bus > registered upon failure sets up the kernel for crashing. Moving > the code ahead of register_xenstore_notifier() will take care of > one half of the problem, but you'll nevertheless will need to call > bus_unregister() if you really intend to make this a fatal error > condition (which by itself is questionable since in most scenarios > you won't need the work queue at all). Right, I will move the error handling to the xenbus frontend resume function. Aurelien.