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
74af0c22
Commit
74af0c22
authored
Oct 10, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inet: Improve messaging in can_dump_inet_sk error paths
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
4648090f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
sk-inet.c
sk-inet.c
+11
-6
No files found.
sk-inet.c
View file @
74af0c22
...
@@ -93,13 +93,15 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
...
@@ -93,13 +93,15 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
BUG_ON
((
sk
->
sd
.
family
!=
AF_INET
)
&&
(
sk
->
sd
.
family
!=
AF_INET6
));
BUG_ON
((
sk
->
sd
.
family
!=
AF_INET
)
&&
(
sk
->
sd
.
family
!=
AF_INET6
));
if
(
sk
->
shutdown
)
{
if
(
sk
->
shutdown
)
{
pr_err
(
"Can't dump shutdown inet socket
\n
"
);
pr_err
(
"Can't dump shutdown inet socket %x
\n
"
,
sk
->
sd
.
ino
);
return
0
;
return
0
;
}
}
if
(
sk
->
type
==
SOCK_DGRAM
)
{
if
(
sk
->
type
==
SOCK_DGRAM
)
{
if
(
sk
->
wqlen
!=
0
)
{
if
(
sk
->
wqlen
!=
0
)
{
pr_err
(
"Can't dump corked dgram socket
\n
"
);
pr_err
(
"Can't dump corked dgram socket %x
\n
"
,
sk
->
sd
.
ino
);
return
0
;
return
0
;
}
}
...
@@ -111,7 +113,9 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
...
@@ -111,7 +113,9 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
}
}
if
(
sk
->
type
!=
SOCK_STREAM
)
{
if
(
sk
->
type
!=
SOCK_STREAM
)
{
pr_err
(
"Only stream and dgram inet sockets for now
\n
"
);
pr_err
(
"Can't dump %d inet socket %x. "
"Only can stream and dgram.
\n
"
,
sk
->
type
,
sk
->
sd
.
ino
);
return
0
;
return
0
;
}
}
...
@@ -123,7 +127,8 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
...
@@ -123,7 +127,8 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
* requests for listen sockets. Need to pick
* requests for listen sockets. Need to pick
* those up and fix the connect job respectively
* those up and fix the connect job respectively
*/
*/
pr_err
(
"In-flight connection (l)
\n
"
);
pr_err
(
"In-flight connection (l) for %x
\n
"
,
sk
->
sd
.
ino
);
return
0
;
return
0
;
}
}
break
;
break
;
...
@@ -138,7 +143,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
...
@@ -138,7 +143,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
/* Trivial case, we just need to create a socket on restore */
/* Trivial case, we just need to create a socket on restore */
break
;
break
;
default:
default:
pr_err
(
"Unknown
state %d
\n
"
,
sk
->
state
);
pr_err
(
"Unknown
inet socket %x state %d
\n
"
,
sk
->
sd
.
ino
,
sk
->
state
);
return
0
;
return
0
;
}
}
...
@@ -150,7 +155,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
...
@@ -150,7 +155,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
case
IPPROTO_UDPLITE
:
case
IPPROTO_UDPLITE
:
break
;
break
;
default:
default:
pr_err
(
"Unsupported
socket proto %d
\n
"
,
prot
o
);
pr_err
(
"Unsupported
proto %d for socket %x
\n
"
,
proto
,
sk
->
sd
.
in
o
);
return
0
;
return
0
;
}
}
...
...
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