aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compat.c
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2025-04-07 11:50:19 +0200
committerBernd Schubert <bernd@bsbernd.com>2025-04-15 00:50:26 +0200
commit8adbc60284ee6636912368c68bea3f94829e6992 (patch)
tree63854ba83e04e819d9cfcd51ba8f7a8508b21df5 /lib/compat.c
parentcba63f915c6217f64d253ba2a304c4b3009666cb (diff)
downloadlibfuse-8adbc60284ee6636912368c68bea3f94829e6992.tar.gz
fuse_lowlevel: Set bufsize if HAVE_SPLICE is not define and avoid race
These are several buf size fixes 1) Set bufsize when HAVE_SPLICE is not defined. Addresses https://github.com/libfuse/libfuse/issues/1184 2) Check in the read retry condition for bufsize, i.e. the value passed to read and not for the buf->mem_size. Using buf->mem_size can be startup racy. Additionally we now also set bufsize on allocation to avoid these races. 3) Allocation and value assigned needs to follow the pattern bufsize = se->bufsize; buf_alloc(bufsize, internal) buf->mem_size = bufsize; I.e. bufsize has to be retrieved first, as se->bufsize might change at anytime - the value used for allocation and must not differ from the value actually used. This also tries to set large sizes in passthrough_hp, to catch issues in xfstests - though requires to set /proc/sys/fs/fuse/max_pages_limit Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to 'lib/compat.c')
0 files changed, 0 insertions, 0 deletions