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
6677bbb7
Commit
6677bbb7
authored
Apr 27, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/net-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
33372d54
5b8e9042
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
net/unix/af_unix.c
net/unix/af_unix.c
+9
-9
No files found.
net/unix/af_unix.c
View file @
6677bbb7
...
...
@@ -47,6 +47,9 @@
* Alexey Kuznetsov : Full scale SMP. Lot of bugs are introduced 8)
* Malcolm Beattie : Set peercred for socketpair
* Michal Ostrowski : Module initialization cleanup.
* Arnaldo C. Melo : Remove MOD_{INC,DEC}_USE_COUNT,
* the core infrastructure is doing that
* for all net proto families now (2.5.69+)
*
*
* Known differences from reference BSD that was tested:
...
...
@@ -360,7 +363,6 @@ static void unix_sock_destructor(struct sock *sk)
#ifdef UNIX_REFCNT_DEBUG
printk
(
KERN_DEBUG
"UNIX %p is destroyed, %d are still alive.
\n
"
,
sk
,
atomic_read
(
&
unix_nr_socks
));
#endif
MOD_DEC_USE_COUNT
;
}
static
int
unix_release_sock
(
unix_socket
*
sk
,
int
embrion
)
...
...
@@ -478,19 +480,16 @@ extern struct proto_ops unix_dgram_ops;
static
struct
sock
*
unix_create1
(
struct
socket
*
sock
)
{
struct
sock
*
sk
;
struct
sock
*
sk
=
NULL
;
struct
unix_sock
*
u
;
if
(
atomic_read
(
&
unix_nr_socks
)
>=
2
*
files_stat
.
max_files
)
return
NULL
;
goto
out
;
MOD_INC_USE_COUNT
;
sk
=
sk_alloc
(
PF_UNIX
,
GFP_KERNEL
,
sizeof
(
struct
unix_sock
),
unix_sk_cachep
);
if
(
!
sk
)
{
MOD_DEC_USE_COUNT
;
return
NULL
;
}
if
(
!
sk
)
goto
out
;
atomic_inc
(
&
unix_nr_socks
);
...
...
@@ -509,7 +508,7 @@ static struct sock * unix_create1(struct socket *sock)
init_MUTEX
(
&
u
->
readsem
);
/* single task reading lock */
init_waitqueue_head
(
&
u
->
peer_wait
);
unix_insert_socket
(
&
unix_sockets_unbound
,
sk
);
out:
return
sk
;
}
...
...
@@ -1928,6 +1927,7 @@ struct proto_ops unix_dgram_ops = {
struct
net_proto_family
unix_family_ops
=
{
.
family
=
PF_UNIX
,
.
create
=
unix_create
,
.
owner
=
THIS_MODULE
,
};
#ifdef CONFIG_SYSCTL
...
...
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