HomeFreeBSD

locks: ensure proper barriers are used with atomic ops when necessary

Description

locks: ensure proper barriers are used with atomic ops when necessary

Unclear how, but the locking routine for mutexes was using the *release*
barrier instead of acquire. This must have been either a copy-pasto or bad
completion.

Going through other uses of atomics shows no barriers in:

  • upgrade routines (addressed in this patch)
  • sections protected with turnstile locks - this should be fine as necessary barriers are in the worst case provided by turnstile unlock

I would like to thank Mark Millard and andreast@ for reporting the problem and
testing previous patches before the issue got identified.

ps.

.-'---`-.

,' `.

\
\

\ _ \
,\ _ ,'-,/-)\
( * \ \,' ,' ,'-)
`._,) -',-')

\/         ''/
 )        / /
/       ,'-'

Hardware provided by: IBM LTC

Details

Provenance
mjgAuthored on
Parents
rS314473: Create README.md file for viewing on github.
Branches
Unknown
Tags
Unknown