[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090127135144.GC18119@ioremap.net>
Date: Tue, 27 Jan 2009 16:51:44 +0300
From: Evgeniy Polyakov <zbr@...emap.net>
To: Oliver Neukum <oliver@...kum.org>
Cc: Andy Grover <andy.grover@...cle.com>, rdreier@...co.com,
rds-devel@....oracle.com, general@...ts.openfabrics.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 06/21] RDS: Connection handling
On Tue, Jan 27, 2009 at 02:47:27PM +0100, Oliver Neukum (oliver@...kum.org) wrote:
> > > +static inline int rds_conn_is_sending(struct rds_connection *conn)
> > > +{
> > > + int ret = 0;
> > > +
> > > + if (!mutex_trylock(&conn->c_send_lock))
> > > + ret = 1;
> > > + else
> > > + mutex_unlock(&conn->c_send_lock);
> > > +
> > > + return ret;
> > > +}
> > > +
> >
> > This one is eventually invoked under the spin_lock with turned off irqs,
> > which may freeze the machine:
> > rds_for_each_conn_info() -> spin_lock_irqsave(global lock) ->
> > rds_conn_info_visitor() -> rds_conn_info_set() -> rds_conn_is_sending()
> > -> boom.
>
> Why? This is _trylock. It won't block.
Unlock may reschedule.
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists