summaryrefslogtreecommitdiff
path: root/units/systemd-udevd.service.in
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2019-10-22 16:09:21 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-25 15:24:49 +0200
commit21b40f16622f171a9969dc334d74fb5eb2f575c2 (patch)
treeea2e335a4330b93c25a35075ebe82edaf72a3242 /units/systemd-udevd.service.in
parentf5d28be33fac86e8d33b5b151f02918ac1e3d6b7 (diff)
downloadsystemd-21b40f16622f171a9969dc334d74fb5eb2f575c2.tar.gz
fileio: introduce read_full_virtual_file() for reading virtual files in sysfs, procfs
Virtual filesystems such as sysfs or procfs use kernfs, and kernfs can work with two sorts of virtual files. One sort uses "seq_file", and the results of the first read are buffered for the second read. The other sort uses "raw" reads which always go direct to the device. In the later case, the content of the virtual file must be retrieved with a single read otherwise subsequent read might get the new value instead of finding EOF immediately. That's the reason why the usage of fread(3) is prohibited in this case as it always performs a second call to read(2) looking for EOF which is subject to the race described previously. Fixes: #13585.
Diffstat (limited to 'units/systemd-udevd.service.in')
0 files changed, 0 insertions, 0 deletions