<div dir="ltr"><div><div><div>Hi,<br><br>probably taking two consecutive spin_lock_bh ?<br>spin_lock_bh(a)<br></div>spin_lock_bh(b)<br><br></div>any thoughts, would be appreciated.<br><br></div>thanks,<br>shafi<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Aug 8, 2013 at 1:01 PM, Mohammed Shafi <span dir="ltr"><<a href="mailto:shafi.kernel@gmail.com" target="_blank">shafi.kernel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi,<br><br></div>I see a warning,<br><br><font><span style="font-size:10pt">/qsdk/qca/src/linux/kernel/softirq.c:159
local_bh_enable_ip+0x5c/0xe0()</span></font><br><br><font><span style="font-size:10pt">spin_lock_bh. While dev_ioctl is called from user context, not sure<br>
why we have the warning <font>because of the f<font>ollowing reasons in softirq.<font>c : 159</font></font></font><br>
<br>
1. in_irqs - interrupt handler context (So we need to use spin_lock_irq_save )<br>
2. disabled_irqs - interrupts are disabled (spin_lock should be good enough ).</span></font><br><br></div>Can some one give me more thoughts, I can see that its not necessary to call spin_lock_bh<br>from softirq context, what are the other scenarios where this might be a problem or not<br>
necessary ? The above warning comes from dev_ioctl (user context), when a new<br></div>network interface is added.<br><br>thanks,<br>shafi<br></div>
</blockquote></div><br></div>