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
f1980d3a
Commit
f1980d3a
authored
Jan 14, 2004
by
Chas Williams
Committed by
David S. Miller
Jan 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: better behavior for sendmsg/recvmsg during async closes
parent
a01f18ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
net/atm/common.c
net/atm/common.c
+8
-13
No files found.
net/atm/common.c
View file @
f1980d3a
...
...
@@ -476,9 +476,8 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
return
-
EOPNOTSUPP
;
vcc
=
ATM_SD
(
sock
);
if
(
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
||
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
))
return
-
sk
->
sk_err
;
if
(
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
)
||
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
return
0
;
skb
=
skb_recv_datagram
(
sk
,
flags
,
flags
&
MSG_DONTWAIT
,
&
error
);
...
...
@@ -530,12 +529,10 @@ int vcc_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
size
=
m
->
msg_iov
->
iov_len
;
vcc
=
ATM_SD
(
sock
);
if
(
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
||
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
))
{
error
=
-
sk
->
sk_err
;
goto
out
;
}
if
(
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
{
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
)
||
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
{
error
=
-
EPIPE
;
send_sig
(
SIGPIPE
,
current
,
0
);
goto
out
;
}
if
(
!
size
)
{
...
...
@@ -561,12 +558,10 @@ int vcc_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
break
;
}
if
(
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
||
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
))
{
error
=
-
sk
->
sk_err
;
break
;
}
if
(
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
{
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
)
||
!
test_bit
(
ATM_VF_READY
,
&
vcc
->
flags
))
{
error
=
-
EPIPE
;
send_sig
(
SIGPIPE
,
current
,
0
);
break
;
}
prepare_to_wait
(
sk
->
sk_sleep
,
&
wait
,
TASK_INTERRUPTIBLE
);
...
...
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