Search Linux Wireless

Re: pull request: wireless-next-2.6 2011-05-16-v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "John W. Linville" <linville@xxxxxxxxxxxxx>
Date: Mon, 16 May 2011 20:08:09 -0400

> I'm sorry, Dave!  In my defense, I am on the verge of sickness and got
> very little sleep last night... :-(
> 
> I have corrected the problem and was sure to perform the correct build
> test this time! :-)

So these hunks made to net/bluetooth/l2cap_core.c:

@@ -3745,11 +3758,14 @@ done:
 static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, struct sk_buff *skb)
 {
 	struct sock *sk;
+	struct l2cap_chan *chan;
 
-	sk = l2cap_get_sock_by_psm(0, psm, conn->src);
-	if (!sk)
+	chan = l2cap_global_chan_by_psm(0, psm, conn->src);
+	if (!chan)
 		goto drop;
 
+	sk = chan->sk;
+
 	bh_lock_sock(sk);
 
 	BT_DBG("sk %p, len %d", sk, skb->len);
@@ -3745,11 +3758,14 @@ done:
 static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, struct sk_buff *skb)
 {
 	struct sock *sk;
+	struct l2cap_chan *chan;
 
-	sk = l2cap_get_sock_by_psm(0, psm, conn->src);
-	if (!sk)
+	chan = l2cap_global_chan_by_psm(0, psm, conn->src);
+	if (!chan)
 		goto drop;
 
+	sk = chan->sk;
+
 	bh_lock_sock(sk);
 
 	BT_DBG("sk %p, len %d", sk, skb->len);

Doesn't generate the following warnings on your compiler?

net/bluetooth/l2cap_core.c: In function ʽl2cap_recv_frameʼ:
net/bluetooth/l2cap_core.c:3758:15: warning: ʽskʼ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3758:15: note: ʽskʼ was declared here
net/bluetooth/l2cap_core.c:3791:15: warning: ʽskʼ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3791:15: note: ʽskʼ was declared here

I'll fix these up with the obvious fixes, but please be more careful
in the future.

Thanks.
?τθΊ{.nΗ+?·???­?+%?Λ?±ιέΆ??w?Ί{.nΗ+?·??{±?«zW¬³ψ§Ά?ʽά¨}©?²Ζ zΪ&j:+v?¨ώψ―ω?w?ώ?ΰ2?ή?¨θ­Ϊ&ʼ)ίʽ«aΆΪ??ϋΰzΏδzΉή?ϊ+?ω???έʼj??wθώf



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux