diff options
authorDaichi Hirono2017-06-15 01:48:07 -0500
committerDaichi Hirono2017-06-19 19:25:28 -0500
commitafa345325647e66dc7add78f7100dc81bd066dbb (patch)
tree0ce95a8d9d3a94cf48b2ff1d231fd76b01a5bc93 /libappfuse/tests
parent7b1d736dac3eb1b3b75cfd1904a29cc9ec09c75d (diff)
Skip FUSE request from /dev/fuse if unique=0
APCT log shows that we got FUSE request unique=0 and replying to such request causes a EINVAL. The possible reasons of getting unique=0 here are: * /dev/fuse actually submits such requests. In this case, not replying to such request probabbly safe as the kernel cannot wait corresponding response without a unique number. We can observing the kernel code to find out what unique=0 actually means. * Memory corruption happens and unique number are cleared with zero. In this case, if we skip unique=0 request, libappfuse does not reply to the kernel request and APCT result will become timeout . To see which case happens, the CL ScopedLogSeverity to output verbose logs and lets FuseBridgeLoop skip a request from /dev/fuse if unique=0. Bug: 62429763 Test: libappfuse_tests Change-Id: I8c4d532564b690d55573b92260170b0cd68150ab
Diffstat (limited to 'libappfuse/tests')
1 files changed, 1 insertions, 0 deletions
diff --git a/libappfuse/tests/ b/libappfuse/tests/
index 51d605136..0a28451bf 100644
--- a/libappfuse/tests/
+++ b/libappfuse/tests/
@@ -67,6 +67,7 @@ class FuseBridgeLoopTest : public ::testing::Test {
67 memset(&request_, 0, sizeof(FuseRequest)); 67 memset(&request_, 0, sizeof(FuseRequest));
68 request_.header.opcode = opcode; 68 request_.header.opcode = opcode;
69 request_.header.len = sizeof(fuse_in_header); 69 request_.header.len = sizeof(fuse_in_header);
70 request_.header.unique = 1;
70 ASSERT_TRUE(request_.Write(dev_sockets_[0])); 71 ASSERT_TRUE(request_.Write(dev_sockets_[0]));
71 72
72 memset(&response_, 0, sizeof(FuseResponse)); 73 memset(&response_, 0, sizeof(FuseResponse));