All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: simplify force_no_mitm_write() with kstrtobool_from_user()
@ 2026-06-17 15:30 Dmitry Antipov
  2026-06-17 18:17 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2026-06-17 15:30 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, Marcel Holtmann; +Cc: linux-bluetooth, Dmitry Antipov

Simplify 'force_no_mitm_write()' by using the convenient
'kstrtobool_from_user()'.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 net/bluetooth/hci_debugfs.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c
index 0635e4641db4..aadffaaff20e 100644
--- a/net/bluetooth/hci_debugfs.c
+++ b/net/bluetooth/hci_debugfs.c
@@ -1161,16 +1161,12 @@ static ssize_t force_no_mitm_write(struct file *file,
 				   size_t count, loff_t *ppos)
 {
 	struct hci_dev *hdev = file->private_data;
-	char buf[32];
-	size_t buf_size = min(count, (sizeof(buf) - 1));
 	bool enable;
+	int err;
 
-	if (copy_from_user(buf, user_buf, buf_size))
-		return -EFAULT;
-
-	buf[buf_size] = '\0';
-	if (kstrtobool(buf, &enable))
-		return -EINVAL;
+	err = kstrtobool_from_user(user_buf, count, &enable);
+	if (err)
+		return err;
 
 	if (enable == hci_dev_test_flag(hdev, HCI_FORCE_NO_MITM))
 		return -EALREADY;
-- 
2.54.0


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

* RE: Bluetooth: simplify force_no_mitm_write() with kstrtobool_from_user()
  2026-06-17 15:30 [PATCH] Bluetooth: simplify force_no_mitm_write() with kstrtobool_from_user() Dmitry Antipov
@ 2026-06-17 18:17 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-06-17 18:17 UTC (permalink / raw)
  To: linux-bluetooth, dmantipov

[-- Attachment #1: Type: text/plain, Size: 2657 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=1113029

---Test result---

Test Summary:
CheckPatch                    PASS      0.59 seconds
VerifyFixes                   PASS      0.07 seconds
VerifySignedoff               PASS      0.07 seconds
GitLint                       PASS      0.20 seconds
SubjectPrefix                 PASS      0.06 seconds
BuildKernel                   PASS      26.57 seconds
CheckAllWarning               PASS      29.13 seconds
CheckSparse                   PASS      27.78 seconds
BuildKernel32                 PASS      25.66 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      572.07 seconds
TestRunner_l2cap-tester       FAIL      57.71 seconds
TestRunner_iso-tester         PASS      80.47 seconds
TestRunner_bnep-tester        PASS      18.93 seconds
TestRunner_mgmt-tester        FAIL      207.33 seconds
TestRunner_rfcomm-tester      PASS      25.14 seconds
TestRunner_sco-tester         PASS      32.73 seconds
TestRunner_ioctl-tester       PASS      26.21 seconds
TestRunner_mesh-tester        FAIL      25.95 seconds
TestRunner_smp-tester         PASS      23.16 seconds
TestRunner_userchan-tester    PASS      19.99 seconds
TestRunner_6lowpan-tester     PASS      22.39 seconds
IncrementalBuild              PASS      24.67 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 96, Passed: 95 (99.0%), Failed: 1, Not Run: 0

Failed Test Cases
L2CAP BR/EDR Server - Set PHY 3M                     Failed       0.250 seconds
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.238 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    2.487 seconds
Mesh - Send cancel - 2                               Timed out    1.989 seconds


https://github.com/bluez/bluetooth-next/pull/326

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-06-17 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 15:30 [PATCH] Bluetooth: simplify force_no_mitm_write() with kstrtobool_from_user() Dmitry Antipov
2026-06-17 18:17 ` bluez.test.bot

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.