public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] endianness bug: missing cpu_to_le16() in l2cap
@ 2006-10-15 21:30 Al Viro
  0 siblings, 0 replies; only message in thread
From: Al Viro @ 2006-10-15 21:30 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: davem, linux-kernel

__l2cap_get_sock_by_addr() expects its first argument in
little-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 net/bluetooth/l2cap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 0995420..07d13a8 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -741,7 +741,7 @@ static int l2cap_sock_listen(struct sock
 		write_lock_bh(&l2cap_sk_list.lock);
 
 		for (psm = 0x1001; psm < 0x1100; psm += 2)
-			if (!__l2cap_get_sock_by_addr(psm, src)) {
+			if (!__l2cap_get_sock_by_addr(htobs(psm), src)) {
 				l2cap_pi(sk)->psm   = htobs(psm);
 				l2cap_pi(sk)->sport = htobs(psm);
 				err = 0;
-- 
1.4.2.GIT


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-15 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-15 21:30 [PATCH 2/4] endianness bug: missing cpu_to_le16() in l2cap Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox