Skip to contentSkip to conversation

bluetooth: btbcm: Fix logic error in forming the board name.

PATCH RESEND Superseded Sasha Finkelstein 4 participants 6 messages Mar 10, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 bluetooth: btbcm: Fix logic error in forming the board name.

This patch fixes an incorrect loop exit condition in code that replaces '/' symbols in the board name. There might also be a memory corruption issue here, but it is unlikely to be a real problem.

---
 drivers/bluetooth/btbcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btbcm.c +1 -1
index 3006e2a0f37e..43e98a598bd9 100644
@@ -511,7 +511,7 @@ static const char *btbcm_get_board_name(struct device *dev)
 	len = strlen(tmp) + 1;
 	board_type = devm_kzalloc(dev, len, GFP_KERNEL);
 	strscpy(board_type, tmp, len);
-	for (i = 0; i < board_type[i]; i++) {
+	for (i = 0; i < len; i++) {
 		if (board_type[i] == '/')
 			board_type[i] = '-';
 	}

---
base-commit: c9c3395d5e3dcc6daee66c6908354d47bf98cb0c
change-id: 20230224-btbcm-wtf-ff32fed3e930

Best regards,

Signature · 1 line
Sasha Finkelstein <[email protected]>
#1 lore raw
FYI: kernel test robot notices the stable kernel rule is not satisfied.

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

Rule: 'Cc: [email protected]' or 'commit <sha1> upstream.'
Subject: [PATCH RESEND] bluetooth: btbcm: Fix logic error in forming the board name.

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
maintainer
#2 lore raw
In reply to Sasha Finkelstein
Quoted 10 lines · On Fri, Mar 10, 2023 at 09:07:33AM +0100, Sasha Finkelstein via B4 Relay wrote:

From: Sasha Finkelstein <[email protected]>

This patch fixes an incorrect loop exit condition in code that replaces '/' symbols in the board name. There might also be a memory corruption issue here, but it is unlikely to be a real problem.

---
 drivers/bluetooth/btbcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

maintainer
#4 lore raw
Quoted 9 lines · Sasha Finkelstein
Quoted 8 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Sorry about that, let's just skip the stable tree part for now then.

That's not how to solve the problem, if it's a bug that needs to be fixed in stable kernels, submit it properly and it will automatically be propagated there as the documentation states.

thanks,

greg k-h

#5 lore raw
In reply to Sasha Finkelstein

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=728518

---Test result---

Test Summary:

CheckPatch                    PASS      0.59 seconds
GitLint                       FAIL      0.67 seconds
SubjectPrefix                 FAIL      0.41 seconds
BuildKernel                   PASS      37.57 seconds
CheckAllWarning               PASS      41.44 seconds
CheckSparse                   PASS      46.53 seconds
CheckSmatch                   PASS      125.81 seconds
BuildKernel32                 PASS      37.45 seconds
TestRunnerSetup               PASS      527.43 seconds
TestRunner_l2cap-tester       PASS      19.21 seconds
TestRunner_iso-tester         PASS      21.61 seconds
TestRunner_bnep-tester        PASS      7.16 seconds
TestRunner_mgmt-tester        PASS      130.18 seconds
TestRunner_rfcomm-tester      PASS      10.74 seconds
TestRunner_sco-tester         PASS      9.58 seconds
TestRunner_ioctl-tester       PASS      11.52 seconds
TestRunner_mesh-tester        PASS      8.97 seconds
TestRunner_smp-tester         PASS      9.95 seconds
TestRunner_userchan-tester    PASS      7.04 seconds
IncrementalBuild              PASS      34.06 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[RESEND] bluetooth: btbcm: Fix logic error in forming the board name.

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[RESEND] bluetooth: btbcm: Fix logic error in forming the board name."
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject

---
Regards,
Linux Bluetooth