mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
pvcalls-front: wait for other operations to return when release passive sockets
Passive sockets can have ongoing operations on them, specifically, we have two wait_event_interruptable calls in pvcalls_front_accept. Add two wake_up calls in pvcalls_front_release, then wait for the potential waiters to return and release the sock_mapping refcount. Signed-off-by: Stefano Stabellini <stefano@aporeto.com> Acked-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
64d6871827
commit
d1a75e0896
1 changed files with 6 additions and 0 deletions
|
@ -1018,6 +1018,12 @@ int pvcalls_front_release(struct socket *sock)
|
||||||
|
|
||||||
pvcalls_front_free_map(bedata, map);
|
pvcalls_front_free_map(bedata, map);
|
||||||
} else {
|
} else {
|
||||||
|
wake_up(&bedata->inflight_req);
|
||||||
|
wake_up(&map->passive.inflight_accept_req);
|
||||||
|
|
||||||
|
while (atomic_read(&map->refcount) > 1)
|
||||||
|
cpu_relax();
|
||||||
|
|
||||||
spin_lock(&bedata->socket_lock);
|
spin_lock(&bedata->socket_lock);
|
||||||
list_del(&map->list);
|
list_del(&map->list);
|
||||||
spin_unlock(&bedata->socket_lock);
|
spin_unlock(&bedata->socket_lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue