Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands
@ 2015-11-06  6:42 Marcel Holtmann
  2015-11-06  6:51 ` kbuild test robot
  2015-11-06  8:16 ` Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Holtmann @ 2015-11-06  6:42 UTC (permalink / raw)
  To: linux-bluetooth

When HCI commands are injected via the raw socket, the core was not
including the decoded opcode value. So ensure that it is actually set.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_sock.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 19b23013c4f6..32caa6271a92 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -1242,6 +1242,11 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
 			goto drop;
 		}
 
+		/* Since the opcode has already been extracted here, store
+		 * a copy of the value for later use by the drivers.
+		 */
+		hci_skb_opcode(skb) = opcode;
+
 		if (ogf == 0x3f) {
 			skb_queue_tail(&hdev->raw_q, skb);
 			queue_work(hdev->workqueue, &hdev->tx_work);
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands
  2015-11-06  6:42 [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands Marcel Holtmann
@ 2015-11-06  6:51 ` kbuild test robot
  2015-11-06  8:16 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2015-11-06  6:51 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: kbuild-all, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

Hi Marcel,

[auto build test ERROR on bluetooth/master]
[also build test ERROR on v4.3 next-20151105]

url:    https://github.com/0day-ci/linux/commits/Marcel-Holtmann/Bluetooth-Add-mising-hci_skb_opcode-for-raw-socket-commands/20151106-144447
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: x86_64-randconfig-x002-11051802 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   net/bluetooth/hci_sock.c: In function 'hci_sock_sendmsg':
>> net/bluetooth/hci_sock.c:1248:3: error: implicit declaration of function 'hci_skb_opcode' [-Werror=implicit-function-declaration]
      hci_skb_opcode(skb) = opcode;
      ^
>> net/bluetooth/hci_sock.c:1248:23: error: lvalue required as left operand of assignment
      hci_skb_opcode(skb) = opcode;
                          ^
   cc1: some warnings being treated as errors

vim +/hci_skb_opcode +1248 net/bluetooth/hci_sock.c

  1242				goto drop;
  1243			}
  1244	
  1245			/* Since the opcode has already been extracted here, store
  1246			 * a copy of the value for later use by the drivers.
  1247			 */
> 1248			hci_skb_opcode(skb) = opcode;
  1249	
  1250			if (ogf == 0x3f) {
  1251				skb_queue_tail(&hdev->raw_q, skb);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 28326 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands
  2015-11-06  6:42 [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands Marcel Holtmann
  2015-11-06  6:51 ` kbuild test robot
@ 2015-11-06  8:16 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2015-11-06  8:16 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Fri, Nov 06, 2015, Marcel Holtmann wrote:
> When HCI commands are injected via the raw socket, the core was not
> including the decoded opcode value. So ensure that it is actually set.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_sock.c | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to bluetooth-next. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-06  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06  6:42 [PATCH v2] Bluetooth: Add mising hci_skb_opcode for raw socket commands Marcel Holtmann
2015-11-06  6:51 ` kbuild test robot
2015-11-06  8:16 ` Johan Hedberg

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