diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-03-31 17:49:10 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-03-31 17:49:10 +0200 |
commit | a2ebe5c79a45a0f9ed35bbb690f5070cdfded3ad (patch) | |
tree | 014a979f88cdda75d5fcf89d1f4abc50dd6fbf9a /sys/lib/python/pydoc.py | |
parent | 4a83ce37c649dbcfb5a87c022aad626226904363 (diff) |
devfs: fix locking and ignore undocumented "fsdev:\n" configuration signature
The confstr was shared between readers so seprintconf() could
write concurrently to that buffer which is not safe.
This replaces the shared static confstr[Maxconf] buffer with a
pointer that is initially nil and a buffer that is alloced on
demand.
The new confstr pointer (and buffer) is now only updated while
wlock()ed from the new setconfstr() function.
This is now done by mconfig() / mdelctl() just before releasing
the wlock.
Now, rdconf() will check if confstr has been initialized, and
test for it again while wlock()ed; making sure the configuration
is read only once.
Also, rdconf() used to check for a undocumented "fsdev:\n" string
at the beginning of config data tho that was never documented.
This changes mconfig() to ignore that particular signature so
the example from the manpage will work as documented.
Diffstat (limited to 'sys/lib/python/pydoc.py')
0 files changed, 0 insertions, 0 deletions