On Fri, 14 Dec 2007 16:10:44 +0800 Herbert Xu <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
> >
> > diff -puN 
> > drivers/net/cxgb3/cxgb3_main.c~net-use-mutex_is_locked-for-assert_rtnl 
> > drivers/net/cxgb3/cxgb3_main.c
> > --- a/drivers/net/cxgb3/cxgb3_main.c~net-use-mutex_is_locked-for-assert_rtnl
> > +++ a/drivers/net/cxgb3/cxgb3_main.c
> > @@ -2191,7 +2191,7 @@ static void check_t3b2_mac(struct adapte
> > {
> >        int i;
> > 
> > -       if (!rtnl_trylock())    /* synchronize with ifdown */
> > +       if (rtnl_is_locked())   /* synchronize with ifdown */
> >                return;
> > 
> >        for_each_port(adapter, i) {
> > @@ -2219,7 +2219,6 @@ static void check_t3b2_mac(struct adapte
> >                        p->mac.stats.num_resets++;
> >                }
> >        }
> > -       rtnl_unlock();
> 
> This doesn't look right.  It seems that they really want trylock
> here so we should just fix it by removing the bang.

doh.

> Also, does ASSERT_RTNL still warn when someone calls it from an
> atomic context? We definitely don't want to lose that check.

I don't see how it could warn about that.  Nor should it - one might want
to check that rtnl_lock is held inside preempt_disable() or spin_lock or
whatever.

It might make sense to warn if ASSERT_RTNL is called in in_interrupt()
contexts though.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to