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
ebaabbc2
Commit
ebaabbc2
authored
May 05, 2003
by
Chas Williams
Committed by
David S. Miller
May 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: svcs possible race with sigd.
parent
91859c08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
net/atm/svc.c
net/atm/svc.c
+7
-6
No files found.
net/atm/svc.c
View file @
ebaabbc2
...
...
@@ -64,8 +64,8 @@ static void svc_disconnect(struct atm_vcc *vcc)
DPRINTK
(
"svc_disconnect %p
\n
"
,
vcc
);
if
(
test_bit
(
ATM_VF_REGIS
,
&
vcc
->
flags
))
{
sigd_enq
(
vcc
,
as_close
,
NULL
,
NULL
,
NULL
);
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sigd_enq
(
vcc
,
as_close
,
NULL
,
NULL
,
NULL
);
while
(
!
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
&&
sigd
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule
();
...
...
@@ -124,8 +124,8 @@ static int svc_bind(struct socket *sock,struct sockaddr *sockaddr,
if
(
!
test_bit
(
ATM_VF_HASQOS
,
&
vcc
->
flags
))
return
-
EBADFD
;
vcc
->
local
=
*
addr
;
vcc
->
reply
=
WAITING
;
sigd_enq
(
vcc
,
as_bind
,
NULL
,
NULL
,
&
vcc
->
local
);
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sigd_enq
(
vcc
,
as_bind
,
NULL
,
NULL
,
&
vcc
->
local
);
while
(
vcc
->
reply
==
WAITING
&&
sigd
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule
();
...
...
@@ -169,12 +169,13 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr,
!
vcc
->
qos
.
rxtp
.
traffic_class
)
return
-
EINVAL
;
vcc
->
remote
=
*
addr
;
vcc
->
reply
=
WAITING
;
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sigd_enq
(
vcc
,
as_connect
,
NULL
,
NULL
,
&
vcc
->
remote
);
if
(
flags
&
O_NONBLOCK
)
{
remove_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sock
->
state
=
SS_CONNECTING
;
return
-
EINPROGRESS
;
}
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
error
=
0
;
while
(
vcc
->
reply
==
WAITING
&&
sigd
)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
...
...
@@ -243,8 +244,8 @@ static int svc_listen(struct socket *sock,int backlog)
/* let server handle listen on unbound sockets */
if
(
test_bit
(
ATM_VF_SESSION
,
&
vcc
->
flags
))
return
-
EINVAL
;
vcc
->
reply
=
WAITING
;
sigd_enq
(
vcc
,
as_listen
,
NULL
,
NULL
,
&
vcc
->
local
);
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sigd_enq
(
vcc
,
as_listen
,
NULL
,
NULL
,
&
vcc
->
local
);
while
(
vcc
->
reply
==
WAITING
&&
sigd
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule
();
...
...
@@ -313,8 +314,8 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
}
/* wait should be short, so we ignore the non-blocking flag */
new_vcc
->
reply
=
WAITING
;
sigd_enq
(
new_vcc
,
as_accept
,
old_vcc
,
NULL
,
NULL
);
add_wait_queue
(
&
new_vcc
->
sleep
,
&
wait
);
sigd_enq
(
new_vcc
,
as_accept
,
old_vcc
,
NULL
,
NULL
);
while
(
new_vcc
->
reply
==
WAITING
&&
sigd
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule
();
...
...
@@ -347,8 +348,8 @@ int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos)
DECLARE_WAITQUEUE
(
wait
,
current
);
vcc
->
reply
=
WAITING
;
sigd_enq2
(
vcc
,
as_modify
,
NULL
,
NULL
,
&
vcc
->
local
,
qos
,
0
);
add_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
sigd_enq2
(
vcc
,
as_modify
,
NULL
,
NULL
,
&
vcc
->
local
,
qos
,
0
);
while
(
vcc
->
reply
==
WAITING
&&
!
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
&&
sigd
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
...
...
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