Re: Q: deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----------------------------------------------
Original Message
From: ""<arjan@fenrus.demon.nl>
Subject: Re: Q: deadlock
Date: Sun, 10 Mar 2002 11:12:15 GMT

>In article <63342002301010163277@antisocial.com> you wrote:
>> 
>> Why can the kernel deadlock when calling e.g copy_to_user while holding 
a 
>> spinlock?
>> I understand that the function can block, but not that it could result 
in a 
>> deadlock.
>
>you hold the spinlock and schedule. another process
>gets scheduled and wants to grab the exact same spinlock.....
>grabbing spinlock is busy waiting without scheduling so the
>original process never ever gets a chance to release the lock.... lock
>doesn't get released -> you busy wait forever
>

I do not see why this is a problem since spinlocks are SMP only.
I thought the scheduler (called e.g implicetly by a timer interrupt) would 
eventually make the process holding the spinlock runable. Then this process 
would release the spinlock, and the busy waiting process wold enter the 
critical region?
 

     


_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux