Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
e552bd1a
Unverified
Commit
e552bd1a
authored
Dec 08, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups/cgfsng: cgfsng_devices_activate()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
1aae36a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
cgfsng.c
src/lxc/cgroups/cgfsng.c
+16
-2
No files found.
src/lxc/cgroups/cgfsng.c
View file @
e552bd1a
...
@@ -2810,12 +2810,26 @@ __cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops,
...
@@ -2810,12 +2810,26 @@ __cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops,
{
{
#ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX
#ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX
__do_bpf_program_free
struct
bpf_program
*
devices
=
NULL
;
__do_bpf_program_free
struct
bpf_program
*
devices
=
NULL
;
struct
lxc_conf
*
conf
=
handler
->
conf
;
struct
hierarchy
*
unified
=
ops
->
unified
;
int
ret
;
int
ret
;
struct
lxc_conf
*
conf
;
struct
hierarchy
*
unified
;
struct
lxc_list
*
it
;
struct
lxc_list
*
it
;
struct
bpf_program
*
devices_old
;
struct
bpf_program
*
devices_old
;
if
(
!
ops
)
return
ret_set_errno
(
false
,
ENOENT
);
if
(
!
ops
->
hierarchies
)
return
true
;
if
(
!
ops
->
container_cgroup
)
return
ret_set_errno
(
false
,
EEXIST
);
if
(
!
handler
||
!
handler
->
conf
)
return
ret_set_errno
(
false
,
EINVAL
);
conf
=
handler
->
conf
;
unified
=
ops
->
unified
;
if
(
!
unified
||
!
unified
->
bpf_device_controller
||
if
(
!
unified
||
!
unified
->
bpf_device_controller
||
!
unified
->
container_full_path
||
lxc_list_empty
(
&
conf
->
devices
))
!
unified
->
container_full_path
||
lxc_list_empty
(
&
conf
->
devices
))
return
true
;
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment