Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188883
b: refs/heads/master
c: 101545f
h: refs/heads/master
i:
  188881: 0bb4c87
  188879: 467ecff
v: v3
  • Loading branch information
Marcel Holtmann committed Mar 21, 2010
1 parent 88b47a0 commit 64a0038
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 8 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: 634a4b2038a6eba4c211fb906fa2f6ec9a4bbfc7
refs/heads/master: 101545f6fef4a0a3ea8daf0b5b880df2c6a92a69
10 changes: 9 additions & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3944,16 +3944,24 @@ static ssize_t l2cap_sysfs_show(struct class *dev,
struct sock *sk;
struct hlist_node *node;
char *str = buf;
int size = PAGE_SIZE;

read_lock_bh(&l2cap_sk_list.lock);

sk_for_each(sk, node, &l2cap_sk_list.head) {
struct l2cap_pinfo *pi = l2cap_pi(sk);
int len;

str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
len = snprintf(str, size, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, __le16_to_cpu(pi->psm), pi->scid,
pi->dcid, pi->imtu, pi->omtu, pi->sec_level);

size -= len;
if (size <= 0)
break;

str += len;
}

read_unlock_bh(&l2cap_sk_list.lock);
Expand Down
13 changes: 12 additions & 1 deletion trunk/net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,7 @@ static ssize_t rfcomm_dlc_sysfs_show(struct class *dev,
struct rfcomm_session *s;
struct list_head *pp, *p;
char *str = buf;
int size = PAGE_SIZE;

rfcomm_lock();

Expand All @@ -2113,11 +2114,21 @@ static ssize_t rfcomm_dlc_sysfs_show(struct class *dev,
list_for_each(pp, &s->dlcs) {
struct sock *sk = s->sock->sk;
struct rfcomm_dlc *d = list_entry(pp, struct rfcomm_dlc, list);
int len;

str += sprintf(str, "%s %s %ld %d %d %d %d\n",
len = snprintf(str, size, "%s %s %ld %d %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
d->state, d->dlci, d->mtu, d->rx_credits, d->tx_credits);

size -= len;
if (size <= 0)
break;

str += len;
}

if (size <= 0)
break;
}

rfcomm_unlock();
Expand Down
11 changes: 10 additions & 1 deletion trunk/net/bluetooth/rfcomm/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,13 +1068,22 @@ static ssize_t rfcomm_sock_sysfs_show(struct class *dev,
struct sock *sk;
struct hlist_node *node;
char *str = buf;
int size = PAGE_SIZE;

read_lock_bh(&rfcomm_sk_list.lock);

sk_for_each(sk, node, &rfcomm_sk_list.head) {
str += sprintf(str, "%s %s %d %d\n",
int len;

len = snprintf(str, size, "%s %s %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, rfcomm_pi(sk)->channel);

size -= len;
if (size <= 0)
break;

str += len;
}

read_unlock_bh(&rfcomm_sk_list.lock);
Expand Down
11 changes: 10 additions & 1 deletion trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,13 +960,22 @@ static ssize_t sco_sysfs_show(struct class *dev,
struct sock *sk;
struct hlist_node *node;
char *str = buf;
int size = PAGE_SIZE;

read_lock_bh(&sco_sk_list.lock);

sk_for_each(sk, node, &sco_sk_list.head) {
str += sprintf(str, "%s %s %d\n",
int len;

len = snprintf(str, size, "%s %s %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state);

size -= len;
if (size <= 0)
break;

str += len;
}

read_unlock_bh(&sco_sk_list.lock);
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,7 @@ fib_find_node(struct trie *t, u32 key)
struct node *n;

pos = 0;
n = rcu_dereference_check(t->trie,
rcu_read_lock_held() ||
lockdep_rtnl_is_held());
n = rcu_dereference(t->trie);

while (n != NULL && NODE_TYPE(n) == T_TNODE) {
tn = (struct tnode *) n;
Expand Down

0 comments on commit 64a0038

Please sign in to comment.