livepatch: Wrong usage of spinlock on debug console.
PATCH 1/1 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!
--- xen/common/livepatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/livepatch.c +1 -1
@@ -1642,7 +1642,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 ;
Signature · 7 lines
2.9.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 09.06.17 at 16:16, <[email protected]> wrote:
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!
Quoted 6 lines
CC Ross Lagerwall <[email protected]>CC Boris Ostrovsky <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Julien Grall <[email protected]>Signed-off-by Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 14 lines · Konrad Rzeszutek Wilk
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!
Quoted 7 lines
CC Ross Lagerwall <[email protected]>CC Boris Ostrovsky <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Julien Grall <[email protected]>Signed-off-by Konrad Rzeszutek Wilk <[email protected]>---
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 14 lines · Konrad Rzeszutek Wilk
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!
Quoted 6 lines
CC Ross Lagerwall <[email protected]>CC Boris Ostrovsky <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Julien Grall <[email protected]>Signed-off-by Konrad Rzeszutek Wilk <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Is: Release-ack for 4.9, Is:Re: [PATCH for v4.9] livepatch: Wrong usage of spinlock on debug console.
Quoted 12 lines · Boris Ostrovsky
Quoted 11 lines · Konrad Rzeszutek Wilk
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
Quoted 8 lines
Quoted 8 lines
<facepalm> The effect is that we have just effectively taken the lock and returned without unlocking!
CC Ross Lagerwall <[email protected]>CC Boris Ostrovsky <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Julien Grall <[email protected]>
Julien, could you Release-Ack it for 4.9 please?
Quoted 6 lines
Quoted 1 line
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>Reviewed-and-tested-by Boris Ostrovsky <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: Is: Release-ack for 4.9, Is:Re: [PATCH for v4.9] livepatch: Wrong usage of spinlock on debug console.
Hi Konrad,
Quoted 16 lines · Konrad Rzeszutek Wilk
Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Konrad Rzeszutek Wilk
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!
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
CC Ross Lagerwall <[email protected]>CC Boris Ostrovsky <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>CC Julien Grall <[email protected]>Julien, could you Release-Ack it for 4.9 please?
Sure:
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel