Re: how kernel tty driver prevent multi-user program race condition

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

 



On Mon, Dec 14, 2015 at 03:31:10PM +0800, yoma sophian wrote:
> hi all:
> if there are many usermode program try to open /dev/ttyS1 for example
> and read/write the /dev/ttyS1 at the same time.
> 
> Did kernel tty driver so far handle the race condition above not to
> let the message interleaved?

No.

> such as
> user A --> send "abcd" --> ttyS1
> user B --> send "1234"  --> ttyS1
> 
> how to make sure the serial Tx of ttyS1 will send either "abcd1234" or
> "1234abcd" sequencially instead of "a1b2c3d4", etc.

Don't have multiple userspace programs opening the same tty port :)

greg k-h
--
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