* [PATCH] Bluetooth: btintel: Fix incorrect out of memory check
@ 2021-09-09 12:35 Colin King
2021-09-09 13:26 ` bluez.test.bot
2021-09-10 7:29 ` [PATCH] " Marcel Holtmann
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-09-09 12:35 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
Chethan T N, Kiran K, Srivatsa Ravishankar, linux-bluetooth
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently *ven_data is being assigned the return from a kmalloc call but
the out-of-memory check is checking ven_data and not *ven_data. Fix this
by adding the missing dereference * operator,
Addresses-Coverity: ("Dereference null return")
Fixes: 70dd978952bc ("Bluetooth: btintel: Define a callback to fetch codec config data")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/bluetooth/btintel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 115bb2d07a8d..9359bff47296 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2176,7 +2176,7 @@ static int btintel_get_codec_config_data(struct hci_dev *hdev,
}
*ven_data = kmalloc(sizeof(__u8), GFP_KERNEL);
- if (!ven_data) {
+ if (!*ven_data) {
err = -ENOMEM;
goto error;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: btintel: Fix incorrect out of memory check
2021-09-09 12:35 [PATCH] Bluetooth: btintel: Fix incorrect out of memory check Colin King
@ 2021-09-09 13:26 ` bluez.test.bot
2021-09-10 7:29 ` [PATCH] " Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-09-09 13:26 UTC (permalink / raw)
To: linux-bluetooth, colin.king
[-- Attachment #1: Type: text/plain, Size: 3550 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=544373
---Test result---
Test Summary:
CheckPatch FAIL 0.64 seconds
GitLint FAIL 0.14 seconds
BuildKernel PASS 689.41 seconds
TestRunner: Setup PASS 449.90 seconds
TestRunner: l2cap-tester PASS 3.36 seconds
TestRunner: bnep-tester PASS 2.18 seconds
TestRunner: mgmt-tester FAIL 35.32 seconds
TestRunner: rfcomm-tester PASS 2.49 seconds
TestRunner: sco-tester PASS 2.49 seconds
TestRunner: smp-tester PASS 2.54 seconds
TestRunner: userchan-tester PASS 2.24 seconds
Details
##############################
Test: CheckPatch - FAIL - 0.64 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
Bluetooth: btintel: Fix incorrect out of memory check
WARNING: Unknown commit id '70dd978952bc', maybe rebased or not pulled?
#11:
Fixes: 70dd978952bc ("Bluetooth: btintel: Define a callback to fetch codec config data")
total: 0 errors, 1 warnings, 8 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] Bluetooth: btintel: Fix incorrect out of memory check" has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL - 0.14 seconds
Run gitlint with rule in .gitlint
Bluetooth: btintel: Fix incorrect out of memory check
8: B1 Line exceeds max length (88>80): "Fixes: 70dd978952bc ("Bluetooth: btintel: Define a callback to fetch codec config data")"
##############################
Test: BuildKernel - PASS - 689.41 seconds
Build Kernel with minimal configuration supports Bluetooth
##############################
Test: TestRunner: Setup - PASS - 449.90 seconds
Setup environment for running Test Runner
##############################
Test: TestRunner: l2cap-tester - PASS - 3.36 seconds
Run test-runner with l2cap-tester
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: bnep-tester - PASS - 2.18 seconds
Run test-runner with bnep-tester
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: mgmt-tester - FAIL - 35.32 seconds
Run test-runner with mgmt-tester
Total: 452, Passed: 451 (99.8%), Failed: 1, Not Run: 0
Failed Test Cases
Read Exp Feature - Success Failed 0.018 seconds
##############################
Test: TestRunner: rfcomm-tester - PASS - 2.49 seconds
Run test-runner with rfcomm-tester
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: sco-tester - PASS - 2.49 seconds
Run test-runner with sco-tester
Total: 11, Passed: 11 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: smp-tester - PASS - 2.54 seconds
Run test-runner with smp-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: userchan-tester - PASS - 2.24 seconds
Run test-runner with userchan-tester
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
---
Regards,
Linux Bluetooth
[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 51566 bytes --]
[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3934 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 626847 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 14790 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 13044 bytes --]
[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11858 bytes --]
[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 6514 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: btintel: Fix incorrect out of memory check
2021-09-09 12:35 [PATCH] Bluetooth: btintel: Fix incorrect out of memory check Colin King
2021-09-09 13:26 ` bluez.test.bot
@ 2021-09-10 7:29 ` Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-09-10 7:29 UTC (permalink / raw)
To: Colin King
Cc: Johan Hedberg, Luiz Augusto von Dentz, Chethan T N, Kiran K,
Srivatsa Ravishankar, linux-bluetooth, kernel-janitors,
linux-kernel
Hi Colin,
> Currently *ven_data is being assigned the return from a kmalloc call but
> the out-of-memory check is checking ven_data and not *ven_data. Fix this
> by adding the missing dereference * operator,
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 70dd978952bc ("Bluetooth: btintel: Define a callback to fetch codec config data")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/bluetooth/btintel.c | 2 +-
> 1 file changed, 1 insertion(+), 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:[~2021-09-10 7:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 12:35 [PATCH] Bluetooth: btintel: Fix incorrect out of memory check Colin King
2021-09-09 13:26 ` bluez.test.bot
2021-09-10 7:29 ` [PATCH] " Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.