Re: [PATCH] input: fix data race __ps2_command

2015-09-25 Thread Pali Rohár
On Monday 07 September 2015 16:04:35 Dmitry Vyukov wrote: > The data race happens on ps2dev->cmdcnt and ps2dev->cmdbuf contents. > __ps2_command reads that data concurrently with the interrupt handler. > As the result, for example, if a response arrives just after the > timeout, __ps2_command can c

[PATCH] input: fix data race __ps2_command

2015-09-07 Thread Dmitry Vyukov
The data race happens on ps2dev->cmdcnt and ps2dev->cmdbuf contents. __ps2_command reads that data concurrently with the interrupt handler. As the result, for example, if a response arrives just after the timeout, __ps2_command can copy out garbage from ps2dev->cmdbuf but then see that ps2dev->cmdc