open-iscsi / tcmu-runner

A daemon that handles the userspace side of the LIO TCM-User backstore.
Apache License 2.0
189 stars 148 forks source link

tcmu_read_config(): check read() return value. #656

Closed maurizio-lombardi closed 3 years ago

maurizio-lombardi commented 3 years ago

tcmu-runner doesn't work correctly on Fedora 34 because it enters an infinite loop while reading the /etc/tcmu/tcmu.conf config file. The reason is that tcmu_read_config() doesn't check the read() return value, relying only on errno's value, but the latter should only be checked when read() returns -1.

Signed-off-by: Maurizio Lombardi mlombard@redhat.com