Stefano Stabellini 646d944c2e xen/pvcalls: fix potential endless loop in pvcalls-front.c
mutex_trylock() returns 1 if you take the lock and 0 if not. Assume you
take in_mutex on the first try, but you can't take out_mutex. Next times
you call mutex_trylock() in_mutex is going to fail. It's an endless
loop.

Solve the problem by waiting until the global refcount is 1 instead (the
refcount is 1 when the only active pvcalls frontend function is
pvcalls_front_release).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2017-11-15 16:38:15 -05:00
..
2017-09-07 10:24:21 -07:00
2015-12-21 14:40:55 +00:00
2017-08-15 10:32:49 -04:00
2017-05-02 12:06:50 +02:00
2015-12-21 14:40:55 +00:00
2011-12-16 13:29:31 -05:00
2017-06-05 16:59:12 +02:00