Re: [PATCH char-misc-next] UIO: Fix concurrency issue

From: Pavel Machek
Date: Fri Jun 21 2013 - 08:44:37 EST


On Thu 2013-06-20 16:36:00, Vitalii Demianets wrote:
> In a SMP case there was a race condition issue between
> uio_pdrv_genirq_irqcontrol() running on one CPU and irq handler on another
> CPU. Fix it by spin_locking shared resources access inside irq handler.
> Also:
> - Change disable_irq to disable_irq_nosync to avoid deadlock, because
> disable_irq waits for the completion of the irq handler;
> - Change atomic bit-manipulation routines to their non-atomic counterparts
> as we already are guarding the code by spinlock.
>
> Signed-off-by: Vitalii Demianets <vitas@xxxxxxxxxxxxxxxxx>

Sounds good.

Reviewed-by: Pavel Machek <pavel@xxxxxx>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/