Skip to content

Possibly crash with kernel disabling CONFIG_PROC_PID_CPUSET #214

Open
@yuuzi41

Description

@yuuzi41

It assumes that /proc/self/cpuset exists here,

int fd = signal_safe_open("/proc/self/cpuset", O_RDONLY);

but actually this file doesn't exist if kernel has been built with CONFIG_PROC_PID_CPUSET=n.

when /proc/self/cpuset doesn't exist, open() must be failed and variable fd become negative, then it will crash here.

CHECK_CONDITION(fd >= 0);

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