]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hidp: handle kernel_sendmsg() errors correctly
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 6 Apr 2013 18:28:48 +0000 (20:28 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 17 Apr 2013 06:03:59 +0000 (03:03 -0300)
commit94277d5ca15ef3039a29f8ba4b1f59f50723e2ff
tree2257b013b811f00187fbbeb9f8ea223b6a9f2ac4
parent9c85199274ce3a2ec65604279cde55c3199b6282
Bluetooth: hidp: handle kernel_sendmsg() errors correctly

We shouldn't push back the skbs if kernel_sendmsg() fails. Instead, we
terminate the connection and drop the skb. Only on EAGAIN we push it back
and return.
l2cap doesn't return EAGAIN, yet, but this guarantees we're safe if it
will at some time in the future.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hidp/core.c