Skip to content

epollex: Errors due to pollable accessing a potentially orphaned owner_fd #15760

@sreecha

Description

@sreecha

in epollex implementation, the pollable struct (see below) does not maintain a ref to owner_fd

struct pollable {
  ...
  // only for type fd... one ref to the owner fd
  grpc_fd* owner_fd;
...
};

Since a pollable can outlive its owner_fd, the owner_fd could be orphaned/destroyed without the pollable knowing about it - and this causes a problem if the pollable tries to access owner_fd later (for example, see the function pollset_add_fd_locked() that tries to access the owner_fd field!)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions