Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263527
b: refs/heads/master
c: 751c10a
h: refs/heads/master
i:
  263525: 35d47a2
  263523: 16df98e
  263519: 7d0537d
v: v3
  • Loading branch information
Peter Hurley authored and Gustavo F. Padovan committed Aug 11, 2011
1 parent a3be2bc commit f7c0e32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7bdb8a5cf17f66614a9897645efcd4ccc27535ee
refs/heads/master: 751c10a56802513a6b057c8cf1552cecc1c9afde
1 change: 1 addition & 0 deletions trunk/net/bluetooth/bnep/bnep.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ struct bnep_session {
unsigned int role;
unsigned long state;
unsigned long flags;
atomic_t terminate;
struct task_struct *task;

struct ethhdr eh;
Expand Down
9 changes: 5 additions & 4 deletions trunk/net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static int bnep_session(void *arg)
while (1) {
set_current_state(TASK_INTERRUPTIBLE);

if (kthread_should_stop())
if (atomic_read(&s->terminate))
break;
/* RX */
while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
Expand Down Expand Up @@ -642,9 +642,10 @@ int bnep_del_connection(struct bnep_conndel_req *req)
down_read(&bnep_session_sem);

s = __bnep_get_session(req->dst);
if (s)
kthread_stop(s->task);
else
if (s) {
atomic_inc(&s->terminate);
wake_up_process(s->task);
} else
err = -ENOENT;

up_read(&bnep_session_sem);
Expand Down

0 comments on commit f7c0e32

Please sign in to comment.