Re: Regarding wrong usage of spin_lock_bh

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

 



Hi,

probably taking two consecutive spin_lock_bh ?
spin_lock_bh(a)
spin_lock_bh(b)

any thoughts, would be appreciated.

thanks,
shafi


On Thu, Aug 8, 2013 at 1:01 PM, Mohammed Shafi <shafi.kernel@xxxxxxxxx> wrote:
Hi,

I see a warning,

/qsdk/qca/src/linux/kernel/softirq.c:159 local_bh_enable_ip+0x5c/0xe0()

spin_lock_bh. While dev_ioctl is called from user context, not sure
why we have the warning because of the following reasons in softirq.c : 159

1. in_irqs - interrupt handler context           (So we need to use spin_lock_irq_save )
2. disabled_irqs - interrupts are disabled    (spin_lock should be good enough ).


Can some one give me more thoughts, I can see that its not necessary to call spin_lock_bh
from softirq context, what are the other scenarios where this might be a problem or not
necessary ?  The above warning comes from dev_ioctl  (user context), when a new
network interface is added.

thanks,
shafi

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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