Skip to content

is remote_host->metrics[] update thread-safe? #180

@andywu106

Description

@andywu106

Potential Thread Safety Issue in conn_tunner_sockops()​​

The conn_tunner_sockops() function updates the metric_value and metric_cnt in remote_host->metrics[] ​​without lock protection​​. Since conn_tunner_sockops() may execute concurrently across multiple CPUs, could this lead to ​​thread safety issues​​?such as:

​​Data races​​ between concurrent writes to metric_value/metric_cnt
​​Inconsistent metrics​​ due to non-atomic updates

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions