Commit 5075a03d authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram()

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5bdb72d
...@@ -178,6 +178,7 @@ static void vcc_destroy_socket(struct sock *sk) ...@@ -178,6 +178,7 @@ static void vcc_destroy_socket(struct sock *sk)
struct atm_vcc *vcc = atm_sk(sk); struct atm_vcc *vcc = atm_sk(sk);
struct sk_buff *skb; struct sk_buff *skb;
set_bit(ATM_VF_CLOSE, &vcc->flags);
clear_bit(ATM_VF_READY, &vcc->flags); clear_bit(ATM_VF_READY, &vcc->flags);
if (vcc->dev) { if (vcc->dev) {
if (vcc->dev->ops->close) if (vcc->dev->ops->close)
...@@ -216,6 +217,7 @@ int vcc_release(struct socket *sock) ...@@ -216,6 +217,7 @@ int vcc_release(struct socket *sock)
void vcc_release_async(struct atm_vcc *vcc, int reply) void vcc_release_async(struct atm_vcc *vcc, int reply)
{ {
set_bit(ATM_VF_CLOSE, &vcc->flags); set_bit(ATM_VF_CLOSE, &vcc->flags);
vcc->sk->sk_shutdown |= RCV_SHUTDOWN;
vcc->sk->sk_err = -reply; vcc->sk->sk_err = -reply;
clear_bit(ATM_VF_WAITING, &vcc->flags); clear_bit(ATM_VF_WAITING, &vcc->flags);
vcc->sk->sk_state_change(vcc->sk); vcc->sk->sk_state_change(vcc->sk);
......
...@@ -147,9 +147,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb) ...@@ -147,9 +147,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
return 0; return 0;
case as_close: case as_close:
set_bit(ATM_VF_RELEASED,&vcc->flags); set_bit(ATM_VF_RELEASED,&vcc->flags);
clear_bit(ATM_VF_READY,&vcc->flags); vcc_release_async(vcc, msg->reply);
vcc->sk->sk_err = -msg->reply;
clear_bit(ATM_VF_WAITING, &vcc->flags);
break; break;
case as_modify: case as_modify:
modify_qos(vcc,msg); modify_qos(vcc,msg);
...@@ -205,9 +203,7 @@ static void purge_vcc(struct atm_vcc *vcc) ...@@ -205,9 +203,7 @@ static void purge_vcc(struct atm_vcc *vcc)
if (vcc->sk->sk_family == PF_ATMSVC && if (vcc->sk->sk_family == PF_ATMSVC &&
!test_bit(ATM_VF_META,&vcc->flags)) { !test_bit(ATM_VF_META,&vcc->flags)) {
set_bit(ATM_VF_RELEASED,&vcc->flags); set_bit(ATM_VF_RELEASED,&vcc->flags);
vcc->sk->sk_err = EUNATCH; vcc_release_async(vcc, -EUNATCH);
clear_bit(ATM_VF_WAITING, &vcc->flags);
vcc->sk->sk_state_change(vcc->sk);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment