Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
28693079
Commit
28693079
authored
Mar 07, 2007
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Handle np->opt being NULL in ipv6_getsockopt_sticky().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
d644329b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
net/ipv6/ipv6_sockglue.c
net/ipv6/ipv6_sockglue.c
+7
-3
No files found.
net/ipv6/ipv6_sockglue.c
View file @
28693079
...
@@ -795,11 +795,15 @@ int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
...
@@ -795,11 +795,15 @@ int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
EXPORT_SYMBOL
(
compat_ipv6_setsockopt
);
EXPORT_SYMBOL
(
compat_ipv6_setsockopt
);
#endif
#endif
static
int
ipv6_getsockopt_sticky
(
struct
sock
*
sk
,
struct
ipv6_
opt_hdr
*
hdr
,
static
int
ipv6_getsockopt_sticky
(
struct
sock
*
sk
,
struct
ipv6_
txoptions
*
opt
,
char
__user
*
optval
,
int
len
)
char
__user
*
optval
,
int
len
)
{
{
if
(
!
hdr
)
struct
ipv6_opt_hdr
*
hdr
;
if
(
!
opt
||
!
opt
->
hopopt
)
return
0
;
return
0
;
hdr
=
opt
->
hopopt
;
len
=
min_t
(
int
,
len
,
ipv6_optlen
(
hdr
));
len
=
min_t
(
int
,
len
,
ipv6_optlen
(
hdr
));
if
(
copy_to_user
(
optval
,
hdr
,
ipv6_optlen
(
hdr
)))
if
(
copy_to_user
(
optval
,
hdr
,
ipv6_optlen
(
hdr
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -940,7 +944,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
...
@@ -940,7 +944,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
{
{
lock_sock
(
sk
);
lock_sock
(
sk
);
len
=
ipv6_getsockopt_sticky
(
sk
,
np
->
opt
->
hopopt
,
len
=
ipv6_getsockopt_sticky
(
sk
,
np
->
opt
,
optval
,
len
);
optval
,
len
);
release_sock
(
sk
);
release_sock
(
sk
);
return
put_user
(
len
,
optlen
);
return
put_user
(
len
,
optlen
);
...
...
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