ANDROID: fuse-bpf: Fix crash from assuming iter is kvec

Note that this just stops the crash, it does not correctly set the
buffer. However, since no current use case in Android requires the
buffer, this is tolerable for now.

Bug: 265206112
Test: atest android.scopedstorage.cts.host.ScopedStorageHostTest
      crashes without this, passes with it
Change-Id: I25efac2b1d38fa54b9f26a3f297196fa79e5e7c3
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
Paul Lawrence 2023-01-11 15:40:14 -08:00
parent ae696a5a23
commit 1a11a52838

View file

@ -920,7 +920,8 @@ int fuse_file_write_iter_initialize(
.in_args[0].size = sizeof(fwio->fwi),
.in_args[0].value = &fwio->fwi,
.in_args[1].size = fwio->fwi.size,
.in_args[1].value = from->kvec->iov_base,
.in_args[1].value = iov_iter_is_kvec(from)
? from->kvec->iov_base : NULL,
.out_numargs = 1,
.out_args[0].size = sizeof(fwio->fwio),
.out_args[0].value = &fwio->fwio,