Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Pavel Andrianov, on Mon 05 Sep 2016 13:33:33 +0300, wrote: > synth_direct_store may be called via device_attributes interface. Ah, right. > In which function the lock should be added? That'd be synth_direct_store then, around the while loop. Samuel __

Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov
05.09.2016 12:56, Samuel Thibault пишет: Pavel Andrianov, on Mon 05 Sep 2016 12:54:10 +0300, wrote: 05.09.2016 12:43, Samuel Thibault пишет: Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote: There is a potential race in drivers/staging/speakup/speakup.ko. All operations with global

Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Pavel Andrianov, on Mon 05 Sep 2016 12:54:10 +0300, wrote: > 05.09.2016 12:43, Samuel Thibault пишет: > >Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote: > >>There is a potential race in drivers/staging/speakup/speakup.ko. > >>All operations with global pointe

Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov
05.09.2016 12:43, Samuel Thibault пишет: Hello, Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote: There is a potential race in drivers/staging/speakup/speakup.ko. All operations with global pointers buff_in and buff_out are performed without any locks. Thus, a simultaneous write (via

Re: A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Samuel Thibault
Hello, Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote: > There is a potential race in drivers/staging/speakup/speakup.ko. > All operations with global pointers buff_in and buff_out are performed > without any locks. Thus, a simultaneous write (via synth_buffer

A potential race in drivers/staging/speakup/speakup.ko

2016-09-05 Thread Pavel Andrianov
Hi! There is a potential race in drivers/staging/speakup/speakup.ko. All operations with global pointers buff_in and buff_out are performed without any locks. Thus, a simultaneous write (via synth_buffer_clear or synth_buffer_add) to the pointers may lead to inconsistent data. Should a local