Re: thread-unsafety problems as spl*() ones are NOP

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Sat, 30 Jan 2016 20:23:18 +0100
On 01/30/16 19:31, Slawa Olhovchenkov wrote:
> On Sat, Jan 30, 2016 at 09:25:21PM +0300, Slawa Olhovchenkov wrote:
>
>> On Sat, Jan 30, 2016 at 09:42:13PM +0330, mokhi wrote:
>>
>>> i currently only wanna do patch on kbd.c (because i'm sure there is a
>>> thread-unsafety)
>>> and i don't want to add anything to spltty() nor splx(), i just wanna
>>> add things under where they've been used.
>>> isn't problem with using mutex/spin/lock/unlock etc there?
>>
>> yes.
>> currenly spltty act as mutex_lock(&spltty_mutex), like global lock for
>> all used files. this is also inter-files lock, not only lock inside
>> only kbd.c.
>> you need patch all files. all using spltty need to remove
>> simultaneously.
>>
>
> oh, sorry.
> i am see now all splXXX is nop.
> may be incorretly -- for example, in digi.c i am don't see any lockind
> instead spltty().

Hi,

Code that uses splxxx() needs to have the Giant lock locked when 
running. Refer to the various MPSAFE flags.

--HPS
Received on Sat Jan 30 2016 - 18:21:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:02 UTC