Re: How to implement a driver's read and write operations with synchronization properly

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

 



On Tue, Jul 29, 2014 at 7:47 PM, Jonathan Neuschäfer
<j.neuschaefer@xxxxxxx> wrote:
> I've tried this out myself, and it seems to be an issue with bash:

> As you can see, I observed the same pattern of 1008 and 993 bytes.

I think you're right. The split is done by the user program, separated
from kernel land. So I guess it's reasonable to use the 1st approach,
which is to always release the lock at the end of the operation. But
still, user programs like bash could have a race problem by spliting
the input, I hope that they can somehow take care of this problem
themselves.

Thanks guys.

-- 
Le Quoc Anh

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies





[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux