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
Kirill Smelkov
linux
Commits
946cead0
Commit
946cead0
authored
Nov 23, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.davemloft.net:/disk1/BK/net-2.6.11
into kernel.bkbits.net:/home/davem/net-2.6.11
parents
3a0bcddb
c91f9d94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
net/socket.c
net/socket.c
+6
-8
No files found.
net/socket.c
View file @
946cead0
...
...
@@ -1073,7 +1073,6 @@ int sock_wake_async(struct socket *sock, int how, int band)
static
int
__sock_create
(
int
family
,
int
type
,
int
protocol
,
struct
socket
**
res
,
int
kern
)
{
int
i
;
int
err
;
struct
socket
*
sock
;
...
...
@@ -1118,7 +1117,7 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
net_family_read_lock
();
if
(
net_families
[
family
]
==
NULL
)
{
i
=
-
EAFNOSUPPORT
;
err
=
-
EAFNOSUPPORT
;
goto
out
;
}
...
...
@@ -1128,10 +1127,9 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
* default.
*/
if
(
!
(
sock
=
sock_alloc
()))
{
if
(
!
(
sock
=
sock_alloc
()))
{
printk
(
KERN_WARNING
"socket: no more sockets
\n
"
);
i
=
-
ENFILE
;
/* Not exactly a match, but its the
err
=
-
ENFILE
;
/* Not exactly a match, but its the
closest posix thing */
goto
out
;
}
...
...
@@ -1142,11 +1140,11 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
* We will call the ->create function, that possibly is in a loadable
* module, so we have to bump that loadable module refcnt first.
*/
i
=
-
EAFNOSUPPORT
;
err
=
-
EAFNOSUPPORT
;
if
(
!
try_module_get
(
net_families
[
family
]
->
owner
))
goto
out_release
;
if
((
i
=
net_families
[
family
]
->
create
(
sock
,
protocol
))
<
0
)
if
((
err
=
net_families
[
family
]
->
create
(
sock
,
protocol
))
<
0
)
goto
out_module_put
;
/*
* Now to bump the refcnt of the [loadable] module that owns this
...
...
@@ -1166,7 +1164,7 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
out:
net_family_read_unlock
();
return
i
;
return
err
;
out_module_put:
module_put
(
net_families
[
family
]
->
owner
);
out_release:
...
...
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