All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <s.munaut@whatever-company.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: david.vrabel@citrix.com, boris.ostrovsky@oracle.com,
	Juergen Gross <JGross@suse.com>,
	xen-devel@lists.xenproject.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xenbus: don't BUG() on user mode induced condition
Date: Sun, 21 Aug 2016 21:36:24 +0200	[thread overview]
Message-ID: <CAF6-1L4J5Ysb=ey3+HSvCMCFc53ZXrdv5m4fTw+UVCYQOBOz5A@mail.gmail.com> (raw)
In-Reply-To: <577E1FAD02000078000FBD88@prv-mh.provo.novell.com>

Hi,

> --- 4.7-rc6-xen.orig/drivers/xen/xenbus/xenbus_dev_frontend.c
> +++ 4.7-rc6-xen/drivers/xen/xenbus/xenbus_dev_frontend.c
> @@ -316,11 +316,18 @@ static int xenbus_write_transaction(unsi
>                         rc = -ENOMEM;
>                         goto out;
>                 }
> +       } else {
> +               list_for_each_entry(trans, &u->transactions, list)
> +                       if (trans->handle.id == u->u.msg.tx_id)
> +                               break;
> +               if (&trans->list == &u->transactions)
> +                       return -ESRCH;
>         }

Shouldn't there be some tolerance in there in case the tx_id is zero ?
(i.e. no transaction).

I'm trying to find out why just doing "xenstore-ls" doesn't work on my
4.4.20 kernel and when stracing it, I see it doing :

access("/dev/xen/xenbus", F_OK)         = 0
stat("/dev/xen/xenbus", {st_mode=S_IFCHR|0600, st_rdev=makedev(10,
60), ...}) = 0
open("/dev/xen/xenbus", O_RDWR)         = 3
brk(0)                                  = 0x18e4000
brk(0x1905000)                          = 0x1905000
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fe4dd98e0e0},
{SIG_DFL, [], 0}, 8) = 0
write(3, "\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0", 16) = 16
write(3, "/\0", 2)                      = -1 ESRCH (No such process)


So either what xenstore-ls does is invalid, or that condition
requiring a transaction is too strict.

Or am I missing something here ?


Cheers,

    Sylvain Munaut

  parent reply	other threads:[~2016-08-21 19:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  7:23 [PATCH] xenbus: don't BUG() on user mode induced condition Jan Beulich
2016-07-07  7:23 ` Jan Beulich
2016-07-07 11:21 ` David Vrabel
2016-07-07 11:21 ` [Xen-devel] " David Vrabel
2016-08-21 19:36 ` Sylvain Munaut
2016-08-21 19:36 ` Sylvain Munaut [this message]
2016-08-21 20:00   ` Christoph Moench-Tegeder
2016-08-21 21:18     ` Sylvain Munaut
2016-08-22  6:45   ` [Xen-devel] " Jan Beulich
2016-08-22  7:21     ` Sylvain Munaut
2016-08-22  7:21     ` [Xen-devel] " Sylvain Munaut
2016-08-22  6:45   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF6-1L4J5Ysb=ey3+HSvCMCFc53ZXrdv5m4fTw+UVCYQOBOz5A@mail.gmail.com' \
    --to=s.munaut@whatever-company.com \
    --cc=JBeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.