[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101027.110732.48492064.davem@davemloft.net>
Date: Wed, 27 Oct 2010 11:07:32 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sjur.brandeland@...ricsson.com
Cc: linux@....linux.org.uk, sjurbr@...il.com, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linus.walleij@...ricsson.com,
stefan.xk.nilsson@...ricsson.com,
amarnath.bangalore.revanna@...ricsson.com
Subject: Re: [PATCH 2/4] caif-u5500: CAIF shared memory transport protocol
From: Sjur Braendeland <sjur.brandeland@...ricsson.com>
Date: Fri, 22 Oct 2010 21:03:53 +0200
> + if (!in_irq())
> + spin_lock_bh(&pshm_drv->lock);
> + else
> + spin_lock_irqsave(&pshm_drv->lock, flags);
You should never have contextual based locking schemes like this,
it's not just ugly it's also deadlock prone.
--
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