Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-11 Thread Boris Ostrovsky
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)

Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-11 Thread Boris Ostrovsky
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)

Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-10 Thread Simon Gaiser
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

Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-10 Thread Simon Gaiser
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

Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-10 Thread Boris Ostrovsky
On 02/07/2018 05:22 PM, Simon Gaiser wrote: As the previous commit shows it's quite easy to confuse the transaction reference counting by ending a transaction twice. So at least try to detect and report it. Signed-off-by: Simon Gaiser ---

Re: [PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-10 Thread Boris Ostrovsky
On 02/07/2018 05:22 PM, Simon Gaiser wrote: As the previous commit shows it's quite easy to confuse the transaction reference counting by ending a transaction twice. So at least try to detect and report it. Signed-off-by: Simon Gaiser --- drivers/xen/xenbus/xenbus_xs.c | 9 + 1

[PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-07 Thread Simon Gaiser
As the previous commit shows it's quite easy to confuse the transaction reference counting by ending a transaction twice. So at least try to detect and report it. Signed-off-by: Simon Gaiser --- drivers/xen/xenbus/xenbus_xs.c | 9 + 1 file changed, 9

[PATCH 2/2] xen: xenbus: WARN_ON XS_TRANSACTION_{START,END} misuse

2018-02-07 Thread Simon Gaiser
As the previous commit shows it's quite easy to confuse the transaction reference counting by ending a transaction twice. So at least try to detect and report it. Signed-off-by: Simon Gaiser --- drivers/xen/xenbus/xenbus_xs.c | 9 + 1 file changed, 9 insertions(+) diff --git