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: <fc2c34ea-a2de-722b-22e3-174e9ebb9ce3@oracle.com>
Date:   Tue, 20 Jun 2017 13:15:51 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Stefano Stabellini <sstabellini@...nel.org>,
        xen-devel@...ts.xen.org
Cc:     linux-kernel@...r.kernel.org, jgross@...e.com,
        Stefano Stabellini <stefano@...reto.com>
Subject: Re: [PATCH v4 13/18] xen/pvcalls: implement release command


> +
> +static int pvcalls_back_release_passive(struct xenbus_device *dev,
> +					struct pvcalls_fedata *fedata,
> +					struct sockpass_mapping *mappass)
> +{
> +	if (mappass->sock->sk != NULL) {
> +		write_lock_bh(&mappass->sock->sk->sk_callback_lock);
> +		mappass->sock->sk->sk_user_data = NULL;
> +		mappass->sock->sk->sk_data_ready = mappass->saved_data_ready;
> +		write_unlock_bh(&mappass->sock->sk->sk_callback_lock);
> +	}
> +	down(&fedata->socket_lock);
> +	radix_tree_delete(&fedata->socketpass_mappings, mappass->id);
> +	sock_release(mappass->sock);
> +	flush_workqueue(mappass->wq);
> +	destroy_workqueue(mappass->wq);
> +	kfree(mappass);
> +	up(&fedata->socket_lock);

Can you raise the semaphore earlier, once the mapping is deleted from
the tree?

Also, why are you not locking the tree in pvcalls_back_accept()?

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ