lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [openib-general] ipoib lockdep warning
Roland Dreier wrote:
> Hmm, good point.
>
> It sort of seems to me like the idr interfaces are broken by design.
> Internally, lib/idr.c uses bare spin_lock(&idp->lock) with no
> interrupt disabling or anything in both the idr_pre_get() and
> idr_get_new() code paths.

I wasn't thrilled to see that either. We seem to have a fair precedent
(list.h, rbtree, etc) for leaving serialization to callers.

> 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.

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

\
 
 \ /
  Last update: 2006-07-12 01:55    [W:0.155 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site