[PATCH 2/4] caif-u5500: CAIF shared memory transport protocol
David Miller
davem at davemloft.net
Wed Oct 27 14:07:32 EDT 2010
From: Sjur Braendeland <sjur.brandeland at stericsson.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.
More information about the linux-arm-kernel
mailing list