projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
761ed01
)
bluetooth: handle l2cap_create_connless_pdu() errors
author
Dan Carpenter
<
[email protected]
>
Wed, 21 Apr 2010 23:52:01 +0000
(23:52 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 28 Apr 2010 00:03:36 +0000
(17:03 -0700)
l2cap_create_connless_pdu() can sometimes return ERR_PTR(-ENOMEM) or
ERR_PTR(-EFAULT).
Signed-off-by: Dan Carpenter <
[email protected]
>
Acked-by: Marcel Holtmann <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/bluetooth/l2cap.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/l2cap.c
b/net/bluetooth/l2cap.c
index 99d68c34e4f11d4de5e2b7822f07b0384798eb78..9753b690a8b356b9bd24e88efb45d8d6e2b5ca56 100644
(file)
--- a/
net/bluetooth/l2cap.c
+++ b/
net/bluetooth/l2cap.c
@@
-1626,7
+1626,10
@@
static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
/* Connectionless channel */
if (sk->sk_type == SOCK_DGRAM) {
skb = l2cap_create_connless_pdu(sk, msg, len);
- err = l2cap_do_send(sk, skb);
+ if (IS_ERR(skb))
+ err = PTR_ERR(skb);
+ else
+ err = l2cap_do_send(sk, skb);
goto done;
}