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]
Message-Id: <20190602.180334.1932703293092139564.davem@davemloft.net>
Date:   Sun, 02 Jun 2019 18:03:34 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     sgarzare@...hat.com
Cc:     netdev@...r.kernel.org, stefanha@...hat.com,
        virtualization@...ts.linux-foundation.org, mst@...hat.com,
        jasowang@...hat.com, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH v3 2/5] vsock/virtio: fix locking for fwd_cnt and
 buf_alloc

From: Stefano Garzarella <sgarzare@...hat.com>
Date: Fri, 31 May 2019 15:39:51 +0200

> @@ -434,7 +434,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock *vsk, u64 val)
>  	if (val > vvs->buf_size_max)
>  		vvs->buf_size_max = val;
>  	vvs->buf_size = val;
> +	spin_lock_bh(&vvs->rx_lock);
>  	vvs->buf_alloc = val;
> +	spin_unlock_bh(&vvs->rx_lock);

This locking doesn't do anything other than to strongly order the
buf_size store to occur before the buf_alloc one.

If you need a memory barrier, use one.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ