diff options
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r-- | net/bluetooth/hidp/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 519cdb920f93..96434d774c84 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -581,6 +581,12 @@ static int hidp_session(void *arg) | |||
581 | hid_free_device(session->hid); | 581 | hid_free_device(session->hid); |
582 | } | 582 | } |
583 | 583 | ||
584 | /* Wakeup user-space polling for socket errors */ | ||
585 | session->intr_sock->sk->sk_err = EUNATCH; | ||
586 | session->ctrl_sock->sk->sk_err = EUNATCH; | ||
587 | |||
588 | hidp_schedule(session); | ||
589 | |||
584 | fput(session->intr_sock->file); | 590 | fput(session->intr_sock->file); |
585 | 591 | ||
586 | wait_event_timeout(*(ctrl_sk->sk_sleep), | 592 | wait_event_timeout(*(ctrl_sk->sk_sleep), |
@@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conndel_req *req) | |||
879 | skb_queue_purge(&session->ctrl_transmit); | 885 | skb_queue_purge(&session->ctrl_transmit); |
880 | skb_queue_purge(&session->intr_transmit); | 886 | skb_queue_purge(&session->intr_transmit); |
881 | 887 | ||
888 | /* Wakeup user-space polling for socket errors */ | ||
889 | session->intr_sock->sk->sk_err = EUNATCH; | ||
890 | session->ctrl_sock->sk->sk_err = EUNATCH; | ||
891 | |||
882 | /* Kill session thread */ | 892 | /* Kill session thread */ |
883 | atomic_inc(&session->terminate); | 893 | atomic_inc(&session->terminate); |
884 | hidp_schedule(session); | 894 | hidp_schedule(session); |