Thread (7 messages) read the whole thread 7 messages, 3 authors, 2021-08-19

Re: [PATCH] Bluetooth: add timeout sanity check to hci_inquiry

From: Pavel Skripkin <hidden>
Date: 2021-08-19 15:10:05
Also in: lkml, netdev

On 8/19/21 6:05 PM, Marcel Holtmann wrote:
Hi Pavel,
quoted
	}
	/* Restrict maximum inquiry length to 60 seconds */
	if (ir.length > 60) {
		..
	}
quoted
+	if (ir.length > HCI_INQUIRY_MAX_TIMEOUT) {
+		err = -EINVAL;
+		goto done;
+	}
+
I found this easier to read than adding anything define somewhere else. And since this is a legacy interface that is no longer used by bluetoothd, this should be fine. We will start to deprecate this eventually.

And I prefer 1 minute max time here. Just to be safe.
I thought, that user-space should be aware of maximum value, that's why 
I decided to add this define :) I didn't know, that this interface is 
legacy.

Will fix in v2, thank you!


With regards,
Pavel Skripkin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help