Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103678
b: refs/heads/master
c: ec8dab3
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann committed Jul 14, 2008
1 parent a2cb94a commit 5a5dd37
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0c22f226502be6eab37a1d9bf6fb0fadf551376
refs/heads/master: ec8dab36e0738d3059980d144e34f16a26bbda7d
5 changes: 5 additions & 0 deletions trunk/net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,11 @@ static int bnep_session(void *arg)
/* Delete network device */
unregister_netdev(dev);

/* Wakeup user-space polling for socket errors */
s->sock->sk->sk_err = EUNATCH;

wake_up_interruptible(s->sock->sk->sk_sleep);

/* Release the socket */
fput(s->sock->file);

Expand Down
10 changes: 10 additions & 0 deletions trunk/net/bluetooth/hidp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,12 @@ static int hidp_session(void *arg)
hid_free_device(session->hid);
}

/* Wakeup user-space polling for socket errors */
session->intr_sock->sk->sk_err = EUNATCH;
session->ctrl_sock->sk->sk_err = EUNATCH;

hidp_schedule(session);

fput(session->intr_sock->file);

wait_event_timeout(*(ctrl_sk->sk_sleep),
Expand Down Expand Up @@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conndel_req *req)
skb_queue_purge(&session->ctrl_transmit);
skb_queue_purge(&session->intr_transmit);

/* Wakeup user-space polling for socket errors */
session->intr_sock->sk->sk_err = EUNATCH;
session->ctrl_sock->sk->sk_err = EUNATCH;

/* Kill session thread */
atomic_inc(&session->terminate);
hidp_schedule(session);
Expand Down

0 comments on commit 5a5dd37

Please sign in to comment.