linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: bluetooth: assign len after null check
@ 2022-02-15  2:01 Qing Wang
  2022-02-15  3:13 ` bluez.test.bot
  2022-02-16 10:28 ` [PATCH] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Qing Wang @ 2022-02-15  2:01 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S. Miller, Jakub Kicinski, linux-bluetooth, netdev,
	linux-kernel
  Cc: Wang Qing

From: Wang Qing <wangqing@vivo.com>

len should be assigned after a null check

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 net/bluetooth/mgmt_util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c
index edee60b..37eef2c
--- a/net/bluetooth/mgmt_util.c
+++ b/net/bluetooth/mgmt_util.c
@@ -77,11 +77,12 @@ int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag,
 {
 	struct hci_dev *hdev;
 	struct mgmt_hdr *hdr;
-	int len = skb->len;
+	int len;
 
 	if (!skb)
 		return -EINVAL;
 
+	len = skb->len;
 	hdev = bt_cb(skb)->mgmt.hdev;
 
 	/* Time stamp */
-- 
2.7.4


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

* RE: net: bluetooth: assign len after null check
  2022-02-15  2:01 [PATCH] net: bluetooth: assign len after null check Qing Wang
@ 2022-02-15  3:13 ` bluez.test.bot
  2022-02-16 10:28 ` [PATCH] " Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-02-15  3:13 UTC (permalink / raw)
  To: linux-bluetooth, wangqing

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

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=614340

---Test result---

Test Summary:
CheckPatch                    PASS      1.62 seconds
GitLint                       PASS      0.94 seconds
SubjectPrefix                 FAIL      0.93 seconds
BuildKernel                   PASS      29.24 seconds
BuildKernel32                 PASS      25.80 seconds
Incremental Build with patchesPASS      36.01 seconds
TestRunner: Setup             PASS      460.64 seconds
TestRunner: l2cap-tester      PASS      13.05 seconds
TestRunner: bnep-tester       PASS      5.87 seconds
TestRunner: mgmt-tester       PASS      100.79 seconds
TestRunner: rfcomm-tester     PASS      7.37 seconds
TestRunner: sco-tester        PASS      7.28 seconds
TestRunner: smp-tester        PASS      7.21 seconds
TestRunner: userchan-tester   PASS      6.09 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.93 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth


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

* Re: [PATCH] net: bluetooth: assign len after null check
  2022-02-15  2:01 [PATCH] net: bluetooth: assign len after null check Qing Wang
  2022-02-15  3:13 ` bluez.test.bot
@ 2022-02-16 10:28 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2022-02-16 10:28 UTC (permalink / raw)
  To: Qing Wang
  Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
	Jakub Kicinski, linux-bluetooth, netdev, linux-kernel

Hi Qing,

> len should be assigned after a null check
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
> net/bluetooth/mgmt_util.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2022-02-16 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  2:01 [PATCH] net: bluetooth: assign len after null check Qing Wang
2022-02-15  3:13 ` bluez.test.bot
2022-02-16 10:28 ` [PATCH] " Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).