mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
livepatch: Wrong usage of spinlock on debug console.
If we have a large amount of livepatches and want to print them
on the console using 'xl debug-keys x' we eventually hit
the preemption check:
if ( i && !(i % 64) )
{
spin_unlock(&payload_lock);
process_pending_softirqs();
if ( spin_trylock(&payload_lock) )
return
<facepalm> The effect is that we have just effectively
taken the lock and returned without unlocking!
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-and-tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
master commit: 75dfe7c566
master date: 2017-06-12 08:59:33 -0400
This commit is contained in:
1 parent
a2e3d27df7
commit
a0ced5abef
1 file changed
+1
-1
@@ -1527,7 +1527,7 @@ static void livepatch_printall(unsigned char key)
|
||||
{
|
||||
spin_unlock(&payload_lock);
|
||||
process_pending_softirqs();
|
||||
if ( spin_trylock(&payload_lock) )
|
||||
if ( !spin_trylock(&payload_lock) )
|
||||
{
|
||||
printk("Couldn't reacquire lock. Try again.\n");
|
||||
return;
|
||||
|
||||