Re: [openib-general] ipoib lockdep warning

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

 



 > > So, ugh... maybe the best thing to do is change lib/idr.c to use
 > > spin_lock_irqsave() internally?
 > 
 > I dunno, it seems to have had _irq() locking in the past?  From the
 > comment at the top:
 > 
 >  * Modified by George Anzinger to reuse immediately and to use
 >  * find bit instructions.  Also removed _irq on spinlocks.

Well, _irq would be no good, because we might want to call idr stuff
with interrupts disabled.  But making idr internally _irqsave seems
like the right fix to me.

I think the real issue here is that the sa_query.c stuff wants to use
the idr mechanism to assign "query ids", and other modules want to be
able to start queries from any context.  So if idr uses bare spin_lock
internally, then sa_query.c has no choice but to wrap all idr calls
inside spin_lock_irqsave and do all allocation with GFP_ATOMIC, which
doesn't seem very nice.

 - R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux