Message ID | 20230713061111.25232-1-chris.lu@mediatek.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v5] Bluetooth: btmtk: Fix kernel crash when processing coredump | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #77: There may be a potential kernel crash risk if 'skb->len - MTK_COREDUMP_END_LEN' total: 0 errors, 1 warnings, 25 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. /github/workspace/src/src/13311347.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. |
tedd_an/GitLint | fail | 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 7: B1 Line exceeds max length (89>80): "[ 215.021695] Unable to handle kernel paging request at virtual address ffffff939fffd3c5" 17: B1 Line exceeds max length (98>80): "[ 215.021943] [ffffff939fffd3c5] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000" 19: B1 Line exceeds max length (82>80): "[ 215.022496] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.186 #3 (HASH:ad23 4)" |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/BuildKernel32 | success | BuildKernel32 PASS |
tedd_an/TestRunnerSetup | success | TestRunnerSetup PASS |
tedd_an/TestRunner_l2cap-tester | success | TestRunner PASS |
tedd_an/TestRunner_iso-tester | success | TestRunner PASS |
tedd_an/TestRunner_bnep-tester | success | TestRunner PASS |
tedd_an/TestRunner_mgmt-tester | success | TestRunner PASS |
tedd_an/TestRunner_rfcomm-tester | success | TestRunner PASS |
tedd_an/TestRunner_sco-tester | success | TestRunner PASS |
tedd_an/TestRunner_ioctl-tester | success | TestRunner PASS |
tedd_an/TestRunner_mesh-tester | success | TestRunner PASS |
tedd_an/TestRunner_smp-tester | success | TestRunner PASS |
tedd_an/TestRunner_userchan-tester | success | TestRunner PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
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=765133 ---Test result--- Test Summary: CheckPatch FAIL 1.13 seconds GitLint FAIL 0.56 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 32.89 seconds CheckAllWarning PASS 36.39 seconds CheckSparse PASS 41.52 seconds CheckSmatch PASS 111.85 seconds BuildKernel32 PASS 31.90 seconds TestRunnerSetup PASS 487.08 seconds TestRunner_l2cap-tester PASS 23.09 seconds TestRunner_iso-tester PASS 42.28 seconds TestRunner_bnep-tester PASS 10.73 seconds TestRunner_mgmt-tester PASS 216.56 seconds TestRunner_rfcomm-tester PASS 16.11 seconds TestRunner_sco-tester PASS 17.09 seconds TestRunner_ioctl-tester PASS 18.18 seconds TestRunner_mesh-tester PASS 13.56 seconds TestRunner_smp-tester PASS 14.35 seconds TestRunner_userchan-tester PASS 11.25 seconds IncrementalBuild PASS 30.21 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: [v5] Bluetooth: btmtk: Fix kernel crash when processing coredump WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #77: There may be a potential kernel crash risk if 'skb->len - MTK_COREDUMP_END_LEN' total: 0 errors, 1 warnings, 25 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. /github/workspace/src/src/13311347.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ############################## Test: GitLint - FAIL Desc: Run gitlint Output: [v5] Bluetooth: btmtk: Fix kernel crash when processing coredump 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 7: B1 Line exceeds max length (89>80): "[ 215.021695] Unable to handle kernel paging request at virtual address ffffff939fffd3c5" 17: B1 Line exceeds max length (98>80): "[ 215.021943] [ffffff939fffd3c5] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000" 19: B1 Line exceeds max length (82>80): "[ 215.022496] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.186 #3 (HASH:ad23 4)" --- Regards, Linux Bluetooth
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c index 786f775196ae..aaabb732082c 100644 --- a/drivers/bluetooth/btmtk.c +++ b/drivers/bluetooth/btmtk.c @@ -395,12 +395,12 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb) /* Mediatek coredump data would be more than MTK_COREDUMP_NUM */ if (data->cd_info.cnt > MTK_COREDUMP_NUM && - skb->len > sizeof(MTK_COREDUMP_END) && - !memcmp((char *)&skb->data[skb->len - sizeof(MTK_COREDUMP_END)], - MTK_COREDUMP_END, sizeof(MTK_COREDUMP_END) - 1)) { - bt_dev_info(hdev, "Mediatek coredump end"); - hci_devcd_complete(hdev); - } + skb->len > MTK_COREDUMP_END_LEN) + if (!memcmp((char *)&skb->data[skb->len - MTK_COREDUMP_END_LEN], + MTK_COREDUMP_END, MTK_COREDUMP_END_LEN - 1)) { + bt_dev_info(hdev, "Mediatek coredump end"); + hci_devcd_complete(hdev); + } break; } diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h index 68309dfe076a..56f5502baadf 100644 --- a/drivers/bluetooth/btmtk.h +++ b/drivers/bluetooth/btmtk.h @@ -24,6 +24,7 @@ #define MTK_COREDUMP_SIZE (1024 * 1000) #define MTK_COREDUMP_END "coredump end" +#define MTK_COREDUMP_END_LEN (sizeof(MTK_COREDUMP_END)) #define MTK_COREDUMP_NUM 255 enum {