Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
cb0447f0
Commit
cb0447f0
authored
May 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/unix-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
86349f7c
a29443da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
net/socket.c
net/socket.c
+5
-7
No files found.
net/socket.c
View file @
cb0447f0
...
...
@@ -1280,26 +1280,26 @@ asmlinkage long sys_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_a
* We don't need try_module_get here, as the listening socket (sock)
* has the protocol module (sock->ops->owner) held.
*/
__module_get
(
sock
->
ops
->
owner
);
__module_get
(
new
sock
->
ops
->
owner
);
err
=
sock
->
ops
->
accept
(
sock
,
newsock
,
sock
->
file
->
f_flags
);
if
(
err
<
0
)
goto
out_
module_put
;
goto
out_
release
;
if
(
upeer_sockaddr
)
{
if
(
newsock
->
ops
->
getname
(
newsock
,
(
struct
sockaddr
*
)
address
,
&
len
,
2
)
<
0
)
{
err
=
-
ECONNABORTED
;
goto
out_
module_put
;
goto
out_
release
;
}
err
=
move_addr_to_user
(
address
,
len
,
upeer_sockaddr
,
upeer_addrlen
);
if
(
err
<
0
)
goto
out_
module_put
;
goto
out_
release
;
}
/* File flags are not inherited via accept() unlike another OSes. */
if
((
err
=
sock_map_fd
(
newsock
))
<
0
)
goto
out_
module_put
;
goto
out_
release
;
security_socket_post_accept
(
sock
,
newsock
);
...
...
@@ -1307,8 +1307,6 @@ asmlinkage long sys_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_a
sockfd_put
(
sock
);
out:
return
err
;
out_module_put:
module_put
(
sock
->
ops
->
owner
);
out_release:
sock_release
(
newsock
);
goto
out_put
;
...
...
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