diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp index b6cc099c269aa896ae5e91bc950689a87490def2..6df7890e4f31bb40434433095b18833d9648b2ce 100644 --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -623,6 +623,7 @@ int32_t SensorServiceClient::CreateSocketChannel() CHKPR(sensorServer_, ERROR); int32_t clientFd = -1; ret = CreateSocketClientFd(clientFd); + fdsan_exchange_owner_tag(clientFd, 0, TAG); if (ret != ERR_OK || clientFd < 0) { Close(); SEN_HILOGE("Create socket channel failed, ret:%{public}d", ret); diff --git a/utils/common/src/sensor_basic_data_channel.cpp b/utils/common/src/sensor_basic_data_channel.cpp index 0c043324e6997b483cb6130ca51ddbf2e8dfdcb1..2e972c84660751027d8892633af5b43ea343e105 100644 --- a/utils/common/src/sensor_basic_data_channel.cpp +++ b/utils/common/src/sensor_basic_data_channel.cpp @@ -112,6 +112,7 @@ int32_t SensorBasicDataChannel::CreateSensorBasicChannel(MessageParcel &data) return ERR_OK; } sendFd_ = data.ReadFileDescriptor(); + fdsan_exchange_owner_tag(sendFd_, 0, TAG); if (sendFd_ < 0) { SEN_HILOGE("ReadFileDescriptor is failed"); sendFd_ = -1;