Re: [PATCH] serial-uartlite: fix missing locking in isr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Mon, Feb 15, 2016 at 02:59:13PM +0100, Maarten Brock wrote:
> > > The uartlite driver suffers from missing/duplicate/corrupted character
> > > data when the interrupt handler runs concurrently with access to the
> > > device from another cpu. Take the port spinlock to exclude concurrent
> > > access.
> > 
> > Though I am very glad this is finally fixed in this driver, I don't think
> > it is the best solution. I (a.k.a. vanmierlo) already had an extensive
> > discussion about it here:
> > https://github.com/Xilinx/linux-xlnx/issues/24
> > 
> > I think the spinlock should be taken and released inside the while loop.
> > 
> > I'll try to find some time to send in a patch for this and also for some
> > other issues from that thread.
> 
> I hope this doesn't end up being a case of perfect being the enemy of
> good. If you or someone else has a better fix ready to commit, I'd be
> happy to see that replace my patch, but if not, then in the mean time
> the driver is completely broken and unsafe on SMP and I think it makes
> sense for my patch to move forward.

I totally agree. The current state without your fix is a broken state.
And as stated I'm really happy that it is at least fixed. Thanks for that.
And I do not yet have a proper patch ready, neither to replace yours nor
to improve yours.

Maarten
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux