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
fa8860d8
Commit
fa8860d8
authored
Apr 19, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
b2520649
525e31f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
include/linux/net.h
include/linux/net.h
+8
-5
net/socket.c
net/socket.c
+14
-5
No files found.
include/linux/net.h
View file @
fa8860d8
...
...
@@ -127,14 +127,17 @@ struct proto_ops {
int
offset
,
size_t
size
,
int
flags
);
};
struct
module
;
struct
net_proto_family
{
int
family
;
int
(
*
create
)(
struct
socket
*
sock
,
int
protocol
);
int
family
;
int
(
*
create
)(
struct
socket
*
sock
,
int
protocol
);
/* These are counters for the number of different methods of
each we support */
short
authentication
;
short
encryption
;
short
encrypt_net
;
short
authentication
;
short
encryption
;
short
encrypt_net
;
struct
module
*
owner
;
};
struct
iovec
;
...
...
net/socket.c
View file @
fa8860d8
...
...
@@ -506,8 +506,13 @@ struct file_operations bad_sock_fops = {
void
sock_release
(
struct
socket
*
sock
)
{
if
(
sock
->
ops
)
if
(
sock
->
ops
)
{
const
int
family
=
sock
->
ops
->
family
;
sock
->
ops
->
release
(
sock
);
sock
->
ops
=
NULL
;
module_put
(
net_families
[
family
]
->
owner
);
}
if
(
sock
->
fasync_list
)
printk
(
KERN_ERR
"sock_release: fasync list not empty!
\n
"
);
...
...
@@ -1058,11 +1063,12 @@ int sock_create(int family, int type, int protocol, struct socket **res)
sock
->
type
=
type
;
i
=
-
EBUSY
;
if
(
!
try_module_get
(
net_families
[
family
]
->
owner
))
goto
out_release
;
if
((
i
=
net_families
[
family
]
->
create
(
sock
,
protocol
))
<
0
)
{
sock_release
(
sock
);
goto
out
;
}
goto
out_release
;
*
res
=
sock
;
security_socket_post_create
(
sock
,
family
,
type
,
protocol
);
...
...
@@ -1070,6 +1076,9 @@ int sock_create(int family, int type, int protocol, struct socket **res)
out:
net_family_read_unlock
();
return
i
;
out_release:
sock_release
(
sock
);
goto
out
;
}
asmlinkage
long
sys_socket
(
int
family
,
int
type
,
int
protocol
)
...
...
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