<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>&gt;On Thu, Feb 25, 2016 at 2:53 PM, Devesh Sharma &lt;<a href="mailto:devesh28@gmail.com">devesh28@gmail.com</a>&gt; wrote:</div><div>&gt;Hi</div><div><br></div><div>&gt;In running kernel there are many places you can look to get the usage. But the bottom line is</div><div><br></div><div>Can you tell me the specific use case?  or give me the file name/driver where this is used.</div><div><br></div><div>&gt;* You can take a spinlock under a mutex. e.g. mutex_lock---&gt;spinlock-----critical section-----spinunlock---&gt;mutex_unlock.</div><div><br></div><div>&gt;* You can not take a mutex under a spinlock. e.g. spinlock---&gt;mutex_lock -----critical section ....mutex_unlock----&gt;spinunlock is not allowed.</div><div><br></div><div><br></div><div>On Thu, Feb 25, 2016 at 11:37 AM, priyaranjan &lt;<a href="mailto:priyaranjan45678@gmail.com">priyaranjan45678@gmail.com</a>&gt; wrote:</div><div>Hello All,</div><div><br></div><div>Do you have any idea of a situation where we would need mutex and spinlock to be locked together? I think there is an example for this in Linux kernel. Can anyone help me?</div><div><br></div><div>Regards,</div><div>Priyaranjan</div><div><br></div><div>_______________________________________________</div><div>Kernelnewbies mailing list</div><div><a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a></div><div><a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></div></div><div><br></div><div><br></div><div><br></div></div></div></div>