Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
a6a476ff
Commit
a6a476ff
authored
Nov 01, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skopts: Prepare for xmalloc-able entries on SkOptsEntry
parent
a723809c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
0 deletions
+9
-0
sockets.h
include/sockets.h
+1
-0
sk-inet.c
sk-inet.c
+1
-0
sk-packet.c
sk-packet.c
+1
-0
sk-unix.c
sk-unix.c
+2
-0
sockets.c
sockets.c
+4
-0
No files found.
include/sockets.h
View file @
a6a476ff
...
@@ -29,6 +29,7 @@ struct socket_desc {
...
@@ -29,6 +29,7 @@ struct socket_desc {
extern
int
dump_socket
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
);
extern
int
dump_socket
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
);
extern
int
dump_socket_opts
(
int
sk
,
SkOptsEntry
*
soe
);
extern
int
dump_socket_opts
(
int
sk
,
SkOptsEntry
*
soe
);
extern
int
restore_socket_opts
(
int
sk
,
SkOptsEntry
*
soe
);
extern
int
restore_socket_opts
(
int
sk
,
SkOptsEntry
*
soe
);
extern
void
release_skopts
(
SkOptsEntry
*
);
extern
int
sk_collect_one
(
int
ino
,
int
family
,
struct
socket_desc
*
d
);
extern
int
sk_collect_one
(
int
ino
,
int
family
,
struct
socket_desc
*
d
);
extern
int
collect_sockets
(
int
pid
);
extern
int
collect_sockets
(
int
pid
);
...
...
sk-inet.c
View file @
a6a476ff
...
@@ -299,6 +299,7 @@ static int do_dump_one_inet_fd(int lfd, u32 id, const struct fd_parms *p, int fa
...
@@ -299,6 +299,7 @@ static int do_dump_one_inet_fd(int lfd, u32 id, const struct fd_parms *p, int fa
break
;
break
;
}
}
err:
err:
release_skopts
(
&
skopts
);
xfree
(
ie
.
src_addr
);
xfree
(
ie
.
src_addr
);
xfree
(
ie
.
dst_addr
);
xfree
(
ie
.
dst_addr
);
return
ret
;
return
ret
;
...
...
sk-packet.c
View file @
a6a476ff
...
@@ -193,6 +193,7 @@ static int dump_one_packet_fd(int lfd, u32 id, const struct fd_parms *p)
...
@@ -193,6 +193,7 @@ static int dump_one_packet_fd(int lfd, u32 id, const struct fd_parms *p)
ret
=
pb_write_one
(
fdset_fd
(
glob_fdset
,
CR_FD_PACKETSK
),
&
psk
,
PB_PACKETSK
);
ret
=
pb_write_one
(
fdset_fd
(
glob_fdset
,
CR_FD_PACKETSK
),
&
psk
,
PB_PACKETSK
);
out:
out:
release_skopts
(
&
skopts
);
xfree
(
psk
.
rx_ring
);
xfree
(
psk
.
rx_ring
);
xfree
(
psk
.
tx_ring
);
xfree
(
psk
.
tx_ring
);
for
(
i
=
0
;
i
<
psk
.
n_mclist
;
i
++
)
for
(
i
=
0
;
i
<
psk
.
n_mclist
;
i
++
)
...
...
sk-unix.c
View file @
a6a476ff
...
@@ -232,6 +232,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
...
@@ -232,6 +232,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
pr_info
(
"Dumping unix socket at %d
\n
"
,
p
->
fd
);
pr_info
(
"Dumping unix socket at %d
\n
"
,
p
->
fd
);
show_one_unix
(
"Dumping"
,
sk
);
show_one_unix
(
"Dumping"
,
sk
);
show_one_unix_img
(
"Dumped"
,
&
ue
);
show_one_unix_img
(
"Dumped"
,
&
ue
);
release_skopts
(
&
skopts
);
list_del_init
(
&
sk
->
list
);
list_del_init
(
&
sk
->
list
);
sk
->
sd
.
already_dumped
=
1
;
sk
->
sd
.
already_dumped
=
1
;
...
@@ -239,6 +240,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
...
@@ -239,6 +240,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
return
0
;
return
0
;
err:
err:
release_skopts
(
&
skopts
);
return
-
1
;
return
-
1
;
}
}
...
...
sockets.c
View file @
a6a476ff
...
@@ -231,6 +231,10 @@ int dump_socket_opts(int sk, SkOptsEntry *soe)
...
@@ -231,6 +231,10 @@ int dump_socket_opts(int sk, SkOptsEntry *soe)
return
ret
;
return
ret
;
}
}
void
release_skopts
(
SkOptsEntry
*
soe
)
{
}
int
dump_socket
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
)
int
dump_socket
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
)
{
{
int
family
;
int
family
;
...
...
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