Re: A data race between tty_port_open() and uart_do_autoconfig()

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

 



On Apr 14, 2021, at 11:08 AM, Greg KH <greg@xxxxxxxxx> wrote:
> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
> 
> A: No.
> Q: Should I include quotations after my reply?
> 
> http://daringfireball.net/2007/07/on_top
Thanks for pointing it out:)
> 
> On Wed, Apr 14, 2021 at 02:35:24PM +0000, Gong, Sishuai wrote:
>> For now we are not sure about if this is a harmful data race or not.
> 
> Can you please work to determine that?
I found an ancient comment left in uart_set_info_user() saying 
mutex_lock(&port->mutex) “This semaphore protects port->count”.
This is untrue since changes on port->count only grab spin_lock(&port->lock).
So it looks like this needs to be fixed. 
> 
>> A potential fix could be using the same mutex lock port->mutex instead
>> of port->lock, to protect every write on port->count so the reader can
>> get a consistent view. However, this seems to be a big change so we
>> are wondering it is worthy of this change.
> 
> Try it out and see!
We will start to think about the patch, and try to submit it after testing soon.
> thanks,
> 
> greg k-h

Thanks,
Sishuai




[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