mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Simon Gaiser <simon@invisiblethingslab.com>,
	xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse
Date: Sun, 11 Feb 2018 10:28:38 -0500	[thread overview]
Message-ID: <0bf1782a-b7c4-1775-c2cb-6e68fe62a199@oracle.com> (raw)
In-Reply-To: <66103cca-321e-6950-2083-6f5d068e12e6@invisiblethingslab.com>



On 02/10/2018 08:27 PM, Simon Gaiser wrote:
> Boris Ostrovsky:
>> On 02/07/2018 05:22 PM, Simon Gaiser wrote:
>>> +    users_old = xs_state_users;
>>>        xs_state_users--;
>>>        if ((req->type == XS_TRANSACTION_START && req->msg.type == XS_ERROR) ||
>>>            req->type == XS_TRANSACTION_END)
>>>            xs_state_users--;
>>> +    if (WARN_ON(xs_state_users > users_old))
>>
>>
>> WARN_ON_ONCE()?
> 
> Since we "fix" the wrong decrement by clamping at zero it should not
> happen immediately again. But if you prefer _ONCE I can change it.
> 


If this error can happen once then someone at least theoretically can 
construct a case when it is repeated. So let's switch to _ONCE() variant.

Thanks.
-boris

  reply	other threads:[~2018-02-11 15:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 22:22 [PATCH 1/2] xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling Simon Gaiser
2018-02-07 22:22 ` [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse Simon Gaiser
2018-02-10 16:57   ` Boris Ostrovsky
2018-02-11  1:27     ` Simon Gaiser
2018-02-11 15:28       ` Boris Ostrovsky [this message]
2018-02-10 16:53 ` [PATCH 1/2] xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling Boris Ostrovsky
2018-02-12  8:49 ` Juergen Gross
2018-02-12  9:06   ` Juergen Gross
2018-02-20  4:56     ` Simon Gaiser
2018-03-02 14:19       ` Juergen Gross
2018-03-02 14:58         ` Simon Gaiser
2018-03-02 15:12           ` Juergen Gross

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=0bf1782a-b7c4-1775-c2cb-6e68fe62a199@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@invisiblethingslab.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®