lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Jan 2017 15:14:57 -0500
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v2 3/3] xen: optimize xenbus driver for multiple
 concurrent xenstore accesses

On 01/16/2017 09:15 AM, Juergen Gross wrote:
> +
> +static uint32_t xs_request_enter(struct xb_req_data *req)
> +{
> +	uint32_t rq_id;
> +
> +	req->type = req->msg.type;
> +
> +	spin_lock(&xs_state_lock);
> +	for (;;) {
> +		if (req->msg.tx_id != 0)
> +			break;
> +		if (xs_suspend_active) {
> +			spin_unlock(&xs_state_lock);
> +			wait_event(xs_state_enter_wq, xs_suspend_active == 0);
> +			spin_lock(&xs_state_lock);
> +			continue;
> +		}
> +		if (req->type == XS_TRANSACTION_START)
> +			xs_state_users++;
> +		break;
> +	}
> +	xs_state_users++;
> +	rq_id = xs_request_id++;
> +	spin_unlock(&xs_state_lock);
> +
> +	return rq_id;
> +}

I should have noticed this last time but I've been looking at this code
again and I don't think I understand why you are incrementing count for
XS_TRANSACTION_START inside the loop.

In fact, why not just 'while(xs_suspend_active) {}' loop?

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ