Skip to content

runtime: runc v2: remove redundant validation#5737

Merged
fuweid merged 1 commit intocontainerd:mainfrom
thaJeztah:remove_redundant_check
Jul 15, 2021
Merged

runtime: runc v2: remove redundant validation#5737
fuweid merged 1 commit intocontainerd:mainfrom
thaJeztah:remove_redundant_check

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

cgroupsv2.LoadManager() already performs VerifyGroupPath(), and returns an error if the path is invalid, so this check is redundant.

see

func LoadManager(mountpoint string, group string) (*Manager, error) {
if err := VerifyGroupPath(group); err != nil {
return nil, err
}
path := filepath.Join(mountpoint, group)

cgroupsv2.LoadManager() already performs VerifyGroupPath(), and returns
an error if the path is invalid, so this check is redundant.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah requested a review from AkihiroSuda July 14, 2021 21:36
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 14, 2021

Build succeeded.

Copy link
Copy Markdown
Contributor

@Zyqsempai Zyqsempai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit e830c53 into containerd:main Jul 15, 2021
@thaJeztah thaJeztah deleted the remove_redundant_check branch July 15, 2021 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants