New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcontainer: intelrdt: fix null intelrdt path issue in Destroy() #1955

Merged
merged 1 commit into from Feb 1, 2019

Conversation

Projects
None yet
3 participants
@xiaochenshen
Copy link
Contributor

xiaochenshen commented Jan 4, 2019

This patch fixes a corner case when destroy a container:

If we start a container without 'intelRdt' config set, and then we run
“runc update --l3-cache-schema/--mem-bw-schema” to add 'intelRdt' config
implicitly.

Now if we enter "exit" from the container inside, we will pass through
linuxContainer.Destroy() -> state.destroy() -> intelRdtManager.Destroy().
But in IntelRdtManager.Destroy(), IntelRdtManager.Path is still null
string, it hasn’t been initialized yet. As a result, the created rdt
group directory during "runc update" will not be removed as expected.

Signed-off-by: Xiaochen Shen xiaochen.shen@intel.com

@xiaochenshen xiaochenshen force-pushed the xiaochenshen:rdt-fix-destroy-issue branch from 97a1a0c to acb75d0 Jan 4, 2019

libcontainer: intelrdt: fix null intelrdt path issue in Destroy()
This patch fixes a corner case when destroy a container:

If we start a container without 'intelRdt' config set, and then we run
“runc update --l3-cache-schema/--mem-bw-schema” to add 'intelRdt' config
implicitly.

Now if we enter "exit" from the container inside, we will pass through
linuxContainer.Destroy() -> state.destroy() -> intelRdtManager.Destroy().
But in IntelRdtManager.Destroy(), IntelRdtManager.Path is still null
string, it hasn’t been initialized yet. As a result, the created rdt
group directory during "runc update" will not be removed as expected.

Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
@crosbymichael

This comment has been minimized.

Copy link
Member

crosbymichael commented Jan 15, 2019

LGTM

Approved with PullApprove

1 similar comment
@mrunalp

This comment has been minimized.

Copy link
Contributor

mrunalp commented Feb 1, 2019

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit e4fa8a4 into opencontainers:master Feb 1, 2019

2 checks passed

code-review/pullapprove Approved by crosbymichael, mrunalp
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment