WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xenstore xenbus failure

To: Adam Wendt <thelsdj@xxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] xenstore xenbus failure
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 23 Jan 2009 15:24:10 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 23 Jan 2009 07:25:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7385ecaf0901201112w19b0b210r304397cbaae0422@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <7385ecaf0901201112w19b0b210r304397cbaae0422@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2009-01-20 at 11:12 -0800, Adam Wendt wrote:
> Hi,
> 
> Still having problems getting xenstore working without the socket
> interface. Here is output running simple xenstore-ls:
> 
> Got message DIRECTORY len 2 from 0x1451b80
> Writing msg DIRECTORY (tool) out to 0x1451b80
> xenstore-ls: xs_directory (/): Invalid argument
> IN 0x1451b80 20090120 10:43:23 DIRECTORY (/ )
> OUT 0x1451b80 20090120 10:43:23 DIRECTORY (tool vm local )

I just noticed something very similar...
        root@bogga:~# xenstore-ls 
        xenstore-ls: xs_directory (/): Success
        root@bogga:~# strace xenstore-ls
        [...]
        open("/proc/xen/xenbus", O_RDWR|O_LARGEFILE) = 3
        [...]
        write(3, "\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0", 16) = 16
        write(3, "/\0", 2)                      = -168004416

I don't like the look of that return value and:
          CC      drivers/xen/xenfs/xenbus.o
        /local/scratch/ianc/devel/kernels/paravirt/drivers/xen/xenfs/xenbus.c: 
In function 'xenbus_file_write':
        
/local/scratch/ianc/devel/kernels/paravirt/drivers/xen/xenfs/xenbus.c:294: 
warning: 'rc' may be used uninitialized in this function

Can you try this patch, it fixes things for me:

diff -r 8fed53a1d8d1 drivers/xen/xenfs/xenbus.c
--- a/drivers/xen/xenfs/xenbus.c        Fri Jan 23 14:16:11 2009 +0000
+++ b/drivers/xen/xenfs/xenbus.c        Fri Jan 23 15:21:12 2009 +0000
@@ -291,7 +291,7 @@
 static int xenbus_write_transaction(unsigned msg_type,
                                    struct xenbus_file_priv *u)
 {
-       int rc, ret;
+       int rc;
        void *reply;
        struct xenbus_transaction_holder *trans = NULL;
        LIST_HEAD(staging_q);
@@ -326,15 +326,14 @@
        }
 
        mutex_lock(&u->reply_mutex);
-       ret = queue_reply(&staging_q, &u->u.msg, sizeof(u->u.msg));
-       if (!ret)
-               ret = queue_reply(&staging_q, reply, u->u.msg.len);
-       if (!ret) {
+       rc = queue_reply(&staging_q, &u->u.msg, sizeof(u->u.msg));
+       if (!rc)
+               rc = queue_reply(&staging_q, reply, u->u.msg.len);
+       if (!rc) {
                list_splice_tail(&staging_q, &u->read_buffers);
                wake_up(&u->read_waitq);
        } else {
                queue_cleanup(&staging_q);
-               rc = ret;
        }
        mutex_unlock(&u->reply_mutex);
 


Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>